Skip to content

Commit

Permalink
changed help info
Browse files Browse the repository at this point in the history
  • Loading branch information
akanshaaa19 committed Nov 26, 2024
1 parent adf4da2 commit e687b65
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 21 deletions.
10 changes: 10 additions & 0 deletions src/common/HelpData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
};
20 changes: 3 additions & 17 deletions src/containers/Template/List/Template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -60,10 +60,6 @@ const getCategory = (category: string) => {
return <p className={styles.TableText}>{capitalizeFirstLetter(categoryName)}</p>;
};

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;
Expand Down Expand Up @@ -168,12 +164,7 @@ export const Template = ({
<RejectedIcon />
{t('Rejected')}
</span>
<HelpIcon
darkIcon={false}
helpData={{
heading: rejectedInfo,
}}
/>
<HelpIcon darkIcon={false} helpData={rejectedTemplateInfo} />
</div>
);
break;

Check warning on line 170 in src/containers/Template/List/Template.tsx

View check run for this annotation

Codecov / codecov/patch

src/containers/Template/List/Template.tsx#L170

Added line #L170 was not covered by tests
Expand All @@ -185,12 +176,7 @@ export const Template = ({
<RejectedIcon />
{t('Failed')}
</span>
<HelpIcon
darkIcon={false}
helpData={{
heading: failedInfo,
}}
/>
<HelpIcon darkIcon={false} helpData={failedTemplateInfo} />
</div>
);
break;
Expand Down
7 changes: 3 additions & 4 deletions src/containers/Template/Template.test.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
},
Expand Down Expand Up @@ -829,6 +827,7 @@ export const HSM_LIST = [
getHSMTemplate('1', 'APPROVED', 'UNKNOWN'),
getHSMTemplate('2', 'PENDING'),
getHSMTemplate('3', 'REJECTED'),
getHSMTemplate('4', 'FAILED'),
],
},
},
Expand Down

0 comments on commit e687b65

Please sign in to comment.