diff --git a/src/assets/images/infoLight.svg b/src/assets/images/infoLight.svg new file mode 100644 index 000000000..5ccc7eade --- /dev/null +++ b/src/assets/images/infoLight.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/common/HelpData.tsx b/src/common/HelpData.tsx index c6a90a4d8..4bd0ea9b3 100644 --- a/src/common/HelpData.tsx +++ b/src/common/HelpData.tsx @@ -1,5 +1,5 @@ export interface HelpDataProps { - heading: string; + heading: any; link?: string; } @@ -106,3 +106,26 @@ 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 templateStatusInfo: HelpDataProps = { + heading: ( +
+

+ Submitted: The template is under review and can take up to 24 hours. This status indicates that the + template has not yet been approved or rejected. +

+

+ Approved: The template has passed review and can be used to notify customers. This status indicates that + the template meets all necessary criteria and policies. +

+

+ Rejected: The template has failed to be reviewed due to violations of the approval criteria. This status + requires revising and resubmitting the template. +

+

+ Failed: The template has failed the review process at Gupshup's end +

+
+ ), + link: 'https://docs.gupshup.io/docs/message-template-approvals-statuses', +}; diff --git a/src/components/UI/HelpIcon/HelpIcon.tsx b/src/components/UI/HelpIcon/HelpIcon.tsx index 5648f5a1c..779c86533 100644 --- a/src/components/UI/HelpIcon/HelpIcon.tsx +++ b/src/components/UI/HelpIcon/HelpIcon.tsx @@ -1,10 +1,12 @@ import styles from './HelpIcon.module.css'; import InfoIcon from 'assets/images/info.svg?react'; +import LightInfoIcon from 'assets/images/infoLight.svg?react'; import { Tooltip } from '@mui/material'; import { HelpDataProps } from 'common/HelpData'; export interface HelpIconProps { helpData?: HelpDataProps; + darkIcon?: boolean; } export const HelpIcon = ({ @@ -12,6 +14,7 @@ export const HelpIcon = ({ heading: '', link: '', }, + darkIcon = true, }: HelpIconProps) => { return ( - + {darkIcon ? : } ); diff --git a/src/containers/Template/List/Template.module.css b/src/containers/Template/List/Template.module.css index 08fd56219..d56ba6578 100644 --- a/src/containers/Template/List/Template.module.css +++ b/src/containers/Template/List/Template.module.css @@ -130,14 +130,14 @@ border-radius: 24px; border: 1px solid #cccccc; display: flex; - width: 130px; + width: 140px; margin: auto; height: 36px !important; background: #ffffff; min-height: 36px !important; } -.DropDown > fieldset { +.DropDown>fieldset { border: none !important; } @@ -149,3 +149,10 @@ width: 20%; min-width: 100px; } + + +.FilterContainer { + display: flex; + align-items: center; + gap: 0.25rem; +} \ No newline at end of file diff --git a/src/containers/Template/List/Template.tsx b/src/containers/Template/List/Template.tsx index 0d7ad05f1..312ac7e72 100644 --- a/src/containers/Template/List/Template.tsx +++ b/src/containers/Template/List/Template.tsx @@ -23,10 +23,11 @@ import CopyAllOutlined from 'assets/images/icons/Flow/Copy.svg?react'; import { ProviderContext } from 'context/session'; import { copyToClipboardMethod, exportCsvFile, getFileExtension } from 'common/utils'; import { AutoComplete } from 'components/UI/Form/AutoComplete/AutoComplete'; +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 { speedSendInfo, templateInfo, templateStatusInfo } from 'common/HelpData'; import styles from './Template.module.css'; import { RaiseToGupShup } from './RaiseToGupshupDialog/RaiseToGupShup'; @@ -165,6 +166,15 @@ export const Template = ({ ); break; + case 'FAILED': + statusValue = ( +
+ + {t('Failed')} +
+ ); + break; + default: statusValue = status; } @@ -306,7 +316,7 @@ export const Template = ({ } const filterTemplateStatus = ( - <> +