From 470452868bff60f3d0e0efa1bcde471c0cd8e905 Mon Sep 17 00:00:00 2001 From: akanshaaaa19 Date: Tue, 9 Apr 2024 13:37:52 +0530 Subject: [PATCH 01/10] updated the error message --- src/components/UI/Form/Input/Input.module.css | 2 +- src/containers/Template/Form/HSM/HSM.test.tsx | 2 +- src/containers/Template/Form/Template.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/UI/Form/Input/Input.module.css b/src/components/UI/Form/Input/Input.module.css index 68b805f44..e99ee489d 100644 --- a/src/components/UI/Form/Input/Input.module.css +++ b/src/components/UI/Form/Input/Input.module.css @@ -87,4 +87,4 @@ .Input { width: 100%; } -} +} \ No newline at end of file diff --git a/src/containers/Template/Form/HSM/HSM.test.tsx b/src/containers/Template/Form/HSM/HSM.test.tsx index 942cd5d15..24f6d3a90 100644 --- a/src/containers/Template/Form/HSM/HSM.test.tsx +++ b/src/containers/Template/Form/HSM/HSM.test.tsx @@ -108,7 +108,7 @@ describe('Add mode', () => { // expect an error expect( screen.getByText( - 'Message and sample look different. Please check for any characters, extra spaces or new lines.' + 'Message and sample look different. You have to replace variables eg. {{1}} with actual values enclosed in [ ] eg. Replace {{1}} with [Monica].' ) ).toBeInTheDocument(); }); diff --git a/src/containers/Template/Form/Template.tsx b/src/containers/Template/Form/Template.tsx index 6ee82e3e1..f3c6cf104 100644 --- a/src/containers/Template/Form/Template.tsx +++ b/src/containers/Template/Form/Template.tsx @@ -41,7 +41,7 @@ const HSMValidation = { return finalExampleValue === finalmessageValue; }, message: - 'Message and sample look different. Please check for any characters, extra spaces or new lines.', + 'Message and sample look different. You have to replace variables eg. {{1}} with actual values enclosed in [ ] eg. Replace {{1}} with [Monica].', }) ) .required('Example is required.'), From 70aacd9c064f27f701e6d415ba5f66bd3ab18305 Mon Sep 17 00:00:00 2001 From: akanshaaaa19 Date: Mon, 15 Apr 2024 09:00:24 +0530 Subject: [PATCH 02/10] added traslation --- src/containers/Template/Form/Template.tsx | 49 ++++++++++++----------- src/i18n/en/en.json | 3 +- src/i18n/hi/hi.json | 3 +- 3 files changed, 29 insertions(+), 26 deletions(-) diff --git a/src/containers/Template/Form/Template.tsx b/src/containers/Template/Form/Template.tsx index f3c6cf104..c40c0e18c 100644 --- a/src/containers/Template/Form/Template.tsx +++ b/src/containers/Template/Form/Template.tsx @@ -30,30 +30,6 @@ import styles from './Template.module.css'; const regexForShortcode = /^[a-z0-9_]+$/g; -const HSMValidation = { - example: Yup.string() - .max(1024, 'Maximum 1024 characters are allowed') - .when('body', ([body], schema: any) => - schema.test({ - test: (exampleValue: any) => { - const finalmessageValue = body && body.replace(/\{\{([1-9]|1[0-9])\}\}/g, '[]'); - const finalExampleValue = exampleValue && exampleValue.replace(/\[[^\]]*\]/g, '[]'); - return finalExampleValue === finalmessageValue; - }, - message: - 'Message and sample look different. You have to replace variables eg. {{1}} with actual values enclosed in [ ] eg. Replace {{1}} with [Monica].', - }) - ) - .required('Example is required.'), - category: Yup.object().nullable().required('Category is required.'), - shortcode: Yup.string() - .required('Element name is required.') - .matches( - regexForShortcode, - 'Only lowercase alphanumeric characters and underscores are allowed.' - ), -}; - const dialogMessage = ' It will stop showing when you are drafting a customized message.'; const queries = { @@ -398,6 +374,31 @@ const Template = ({ } }; + const HSMValidation = { + example: Yup.string() + .max(1024, 'Maximum 1024 characters are allowed') + .when('body', ([body], schema: any) => + schema.test({ + test: (exampleValue: any) => { + const finalmessageValue = body && body.replace(/\{\{([1-9]|1[0-9])\}\}/g, '[]'); + const finalExampleValue = exampleValue && exampleValue.replace(/\[[^\]]*\]/g, '[]'); + return finalExampleValue === finalmessageValue; + }, + message: t( + 'Message and sample look different. You have to replace variables eg. {{1}} with actual values enclosed in [ ] eg. Replace {{1}} with [Monica].' + ), + }) + ) + .required('Example is required.'), + category: Yup.object().nullable().required('Category is required.'), + shortcode: Yup.string() + .required('Element name is required.') + .matches( + regexForShortcode, + 'Only lowercase alphanumeric characters and underscores are allowed.' + ), + }; + const validateURL = (value: string) => { if (value && type) { setValidatingURL(true); diff --git a/src/i18n/en/en.json b/src/i18n/en/en.json index 5cf8dfcd6..422d705eb 100644 --- a/src/i18n/en/en.json +++ b/src/i18n/en/en.json @@ -465,5 +465,6 @@ "No conversations found!": "No conversations found!", "Add group to collection": "Add group to collection", "Contact": "Contact", - "Remove Contact": "Remove Contact" + "Remove Contact": "Remove Contact", + "Message and sample look different. You have to replace variables eg. {{1}} with actual values enclosed in [ ] eg. Replace {{1}} with [Monica].": "Message and sample look different. You have to replace variables eg. {{1}} with actual values enclosed in [ ] eg. Replace {{1}} with [Monica]." } diff --git a/src/i18n/hi/hi.json b/src/i18n/hi/hi.json index 1f7055716..771b13809 100644 --- a/src/i18n/hi/hi.json +++ b/src/i18n/hi/hi.json @@ -444,5 +444,6 @@ "Your personal WhatsApp number": "आपका निजी WhatsApp नंबर", "Register with ": "Register with ", "Validating URL": "URL मान्य करना", - "Enter name, label, keyword": "नाम, लेबल, कीवर्ड दर्ज करें" + "Enter name, label, keyword": "नाम, लेबल, कीवर्ड दर्ज करें", + "Message and sample look different. You have to replace variables eg. {{1}} with actual values enclosed in [ ] eg. Replace {{1}} with [Monica].": "संदेश और नमूना अलग दिखते हैं. आपको वेरिएबल्स को बदलना होगा जैसे। {{1}} उदाहरण के लिए [ ] में संलग्न वास्तविक मानों के साथ। {{1}} को [मोनिका] से बदलें।" } From 455063478186ba6737ae4da23f9e49737d28ddca Mon Sep 17 00:00:00 2001 From: akanshaaaa19 Date: Mon, 15 Apr 2024 09:06:34 +0530 Subject: [PATCH 03/10] added translation --- src/containers/Template/Form/Template.tsx | 6 +++--- src/i18n/en/en.json | 5 ++++- src/i18n/hi/hi.json | 5 ++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/containers/Template/Form/Template.tsx b/src/containers/Template/Form/Template.tsx index c40c0e18c..5a0e33e83 100644 --- a/src/containers/Template/Form/Template.tsx +++ b/src/containers/Template/Form/Template.tsx @@ -376,7 +376,7 @@ const Template = ({ const HSMValidation = { example: Yup.string() - .max(1024, 'Maximum 1024 characters are allowed') + .max(1024, t('Maximum 1024 characters are allowed')) .when('body', ([body], schema: any) => schema.test({ test: (exampleValue: any) => { @@ -390,9 +390,9 @@ const Template = ({ }) ) .required('Example is required.'), - category: Yup.object().nullable().required('Category is required.'), + category: Yup.object().nullable().required(t('Category is required.')), shortcode: Yup.string() - .required('Element name is required.') + .required(t('Element name is required.')) .matches( regexForShortcode, 'Only lowercase alphanumeric characters and underscores are allowed.' diff --git a/src/i18n/en/en.json b/src/i18n/en/en.json index 422d705eb..8faf21ad9 100644 --- a/src/i18n/en/en.json +++ b/src/i18n/en/en.json @@ -466,5 +466,8 @@ "Add group to collection": "Add group to collection", "Contact": "Contact", "Remove Contact": "Remove Contact", - "Message and sample look different. You have to replace variables eg. {{1}} with actual values enclosed in [ ] eg. Replace {{1}} with [Monica].": "Message and sample look different. You have to replace variables eg. {{1}} with actual values enclosed in [ ] eg. Replace {{1}} with [Monica]." + "Message and sample look different. You have to replace variables eg. {{1}} with actual values enclosed in [ ] eg. Replace {{1}} with [Monica].": "Message and sample look different. You have to replace variables eg. {{1}} with actual values enclosed in [ ] eg. Replace {{1}} with [Monica].", + "Maximum 1024 characters are allowed": "Maximum 1024 characters are allowed", + "Element name is required.": "Element name is required.", + "Category is required.": "Category is required." } diff --git a/src/i18n/hi/hi.json b/src/i18n/hi/hi.json index 771b13809..20698613e 100644 --- a/src/i18n/hi/hi.json +++ b/src/i18n/hi/hi.json @@ -445,5 +445,8 @@ "Register with ": "Register with ", "Validating URL": "URL मान्य करना", "Enter name, label, keyword": "नाम, लेबल, कीवर्ड दर्ज करें", - "Message and sample look different. You have to replace variables eg. {{1}} with actual values enclosed in [ ] eg. Replace {{1}} with [Monica].": "संदेश और नमूना अलग दिखते हैं. आपको वेरिएबल्स को बदलना होगा जैसे। {{1}} उदाहरण के लिए [ ] में संलग्न वास्तविक मानों के साथ। {{1}} को [मोनिका] से बदलें।" + "Message and sample look different. You have to replace variables eg. {{1}} with actual values enclosed in [ ] eg. Replace {{1}} with [Monica].": "संदेश और नमूना अलग दिखते हैं. आपको वेरिएबल्स को बदलना होगा जैसे। {{1}} उदाहरण के लिए [ ] में संलग्न वास्तविक मानों के साथ। {{1}} को [मोनिका] से बदलें।", + "Maximum 1024 characters are allowed": "अधिकतम 1024 वर्णों की अनुमति है", + "Element name is required.": "तत्व का नाम आवश्यक है.", + "Category is required.": "श्रेणी आवश्यक है." } From 5089c3a862efbb8c63c9a2b70095817e533371e2 Mon Sep 17 00:00:00 2001 From: akanshaaaa19 Date: Mon, 15 Apr 2024 11:51:55 +0530 Subject: [PATCH 04/10] changes cypress branch --- .github/workflows/cypress-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress-testing.yml b/.github/workflows/cypress-testing.yml index f683eaaa6..c14ddea05 100644 --- a/.github/workflows/cypress-testing.yml +++ b/.github/workflows/cypress-testing.yml @@ -96,7 +96,7 @@ jobs: git clone https://github.com/glific/cypress-testing.git echo done. go to dir. cd cypress-testing - git checkout test_cases_wa_group + git checkout main cd .. cp -r cypress-testing/cypress cypress yarn add cypress From 7f8d6436b008e0aeb8cd300ea76e21a9c0f28260 Mon Sep 17 00:00:00 2001 From: akanshaaaa19 Date: Mon, 15 Apr 2024 12:35:15 +0530 Subject: [PATCH 05/10] changed the branch for cypress testing --- .github/workflows/cypress-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress-testing.yml b/.github/workflows/cypress-testing.yml index c14ddea05..f683eaaa6 100644 --- a/.github/workflows/cypress-testing.yml +++ b/.github/workflows/cypress-testing.yml @@ -96,7 +96,7 @@ jobs: git clone https://github.com/glific/cypress-testing.git echo done. go to dir. cd cypress-testing - git checkout main + git checkout test_cases_wa_group cd .. cp -r cypress-testing/cypress cypress yarn add cypress From e0f7e2021dfc2f4e322e2749eba4832c8eace1a0 Mon Sep 17 00:00:00 2001 From: akanshaaaa19 Date: Wed, 17 Apr 2024 18:40:23 +0530 Subject: [PATCH 06/10] updated the banner --- src/containers/Auth/Auth.tsx | 4 +-- .../Auth/Promotion/Promotion.module.css | 30 +++++++++++-------- src/containers/Auth/Promotion/Promotion.tsx | 20 +++++++------ 3 files changed, 30 insertions(+), 24 deletions(-) diff --git a/src/containers/Auth/Auth.tsx b/src/containers/Auth/Auth.tsx index 33ef2f17c..c6e9e4fd5 100644 --- a/src/containers/Auth/Auth.tsx +++ b/src/containers/Auth/Auth.tsx @@ -9,7 +9,7 @@ import WhatsAppIcon from 'assets/images/icons/Social/Whatsapp.svg?react'; import { termsOfUse } from 'containers/Organization/Organization'; import { Button } from 'components/UI/Form/Button/Button'; import GlificLogo from 'assets/images/logo/Logo.svg'; -// import { Promotion } from './Promotion/Promotion'; +import { Promotion } from './Promotion/Promotion'; import styles from './Auth.module.css'; import axios from 'axios'; import { ORGANIZATION_NAME } from 'config'; @@ -259,7 +259,7 @@ export const Auth = ({ ) : null} {/* commenting out the promotion section for now */} - {/* {mode === 'login' && } */} + {mode === 'login' && } ); }; diff --git a/src/containers/Auth/Promotion/Promotion.module.css b/src/containers/Auth/Promotion/Promotion.module.css index 3af21e449..14171ec87 100644 --- a/src/containers/Auth/Promotion/Promotion.module.css +++ b/src/containers/Auth/Promotion/Promotion.module.css @@ -10,7 +10,7 @@ width: 310px; right: 60px; bottom: 0; - padding-bottom: 10px; + padding: 10px 0; border: 4px solid #073f24; border-bottom: 0px; } @@ -22,6 +22,9 @@ .ContainerMin { composes: Container; height: 40px; + display: flex; + align-items: center; + justify-items: center; } .GiftCard { @@ -29,24 +32,24 @@ color: rgba(7, 63, 36, 1); font-size: 14px; font-weight: 500; - margin-top: 9px; - margin-left: 10px; } .AccordianIcon { - margin-left: auto; - margin-right: 16px; - margin-top: 10px; cursor: pointer; } .CardHeader { display: flex; + align-items: center; + justify-content: space-between; + line-height: 14px; + width: 100%; + padding: 0 8px; } .Image { - margin-right: 20px; - margin-left: 20px; + margin-right: 18px; + margin-left: 18px; margin-top: 8px; text-align: center; color: #073f24; @@ -58,14 +61,17 @@ top: 20px; } +.Header { + display: flex; + align-items: center; +} + .Dot { height: 8px; width: 8px; background-color: rgba(221, 31, 31, 1); border-radius: 50%; - margin-left: 17px; - margin-top: 15px; - margin-right: 10px; + margin: 0 4px; } .HeaderText { @@ -75,8 +81,6 @@ width: 34px; letter-spacing: 0px; text-align: left; - line-height: 14px; - margin-top: 12px; } .BodyListText { diff --git a/src/containers/Auth/Promotion/Promotion.tsx b/src/containers/Auth/Promotion/Promotion.tsx index 6da36534d..ae7805b77 100644 --- a/src/containers/Auth/Promotion/Promotion.tsx +++ b/src/containers/Auth/Promotion/Promotion.tsx @@ -9,11 +9,13 @@ export const Promotion = () => { return (
-
-
NEW!
+
+
+
ALERT!
+
{minimized ? ( <> -
New Look Alert!
+
Glific payment timelines
setMinimized(!minimized)} @@ -26,25 +28,25 @@ export const Promotion = () => { {!minimized && ( <> -
New Look Alert!
+
Glific payment timelines & Late Payment Consequences
{1}
- Big News: Glific gets a fresh interface starting March 12th! We've - improved our design for a better experience. + Glific will send invoice on 1st of every month and you will have 15-day payment + window.
2
- What It Means: From March 12th, enjoy Glific's sleek, modern look, - making navigation smoother. + Starting May 1st, 2024, Failure to pay for two consecutive months leads to account + suspension, halting staff access and messaging bot functionality.
-
Discover the new Glific. We're excited for you to see the updates!
+
Reach out to Glific team if you have questions/concerns.
{/* From e3d527b43c8ad456a0d97890d894b2f605f74c90 Mon Sep 17 00:00:00 2001 From: akanshaaaa19 Date: Wed, 17 Apr 2024 18:42:50 +0530 Subject: [PATCH 07/10] removed comments --- src/containers/Auth/Auth.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/Auth/Auth.tsx b/src/containers/Auth/Auth.tsx index c6e9e4fd5..8f71f0d40 100644 --- a/src/containers/Auth/Auth.tsx +++ b/src/containers/Auth/Auth.tsx @@ -258,7 +258,7 @@ export const Auth = ({ ) : null}
- {/* commenting out the promotion section for now */} + {mode === 'login' && }
); From 4ec33db000f2173876a132705c4d59383a5ea541 Mon Sep 17 00:00:00 2001 From: akanshaaaa19 Date: Wed, 17 Apr 2024 20:31:22 +0530 Subject: [PATCH 08/10] changed text to lowercase --- src/containers/Auth/Promotion/Promotion.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/Auth/Promotion/Promotion.tsx b/src/containers/Auth/Promotion/Promotion.tsx index ae7805b77..fb5965bd0 100644 --- a/src/containers/Auth/Promotion/Promotion.tsx +++ b/src/containers/Auth/Promotion/Promotion.tsx @@ -28,7 +28,7 @@ export const Promotion = () => { {!minimized && ( <> -
Glific payment timelines & Late Payment Consequences
+
Glific payment timelines & late payment consequences
From 2bfb247a28515e260541250e1de50149a64fbd35 Mon Sep 17 00:00:00 2001 From: akanshaaaa19 Date: Thu, 18 Apr 2024 13:44:43 +0530 Subject: [PATCH 09/10] updated the floweditor version --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ed9a3be56..d679c5595 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "@emoji-mart/react": "^1.1.1", "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.0", - "@glific/flow-editor": "1.19.3-7", + "@glific/flow-editor": "1.19.3-8", "@lexical/react": "^0.13.1", "@mui/icons-material": "^5.15.12", "@mui/material": "^5.15.12", diff --git a/yarn.lock b/yarn.lock index 3f4be25de..962b67f11 100644 --- a/yarn.lock +++ b/yarn.lock @@ -760,10 +760,10 @@ resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.1.tgz#16308cea045f0fc777b6ff20a9f25474dd8293d2" integrity sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q== -"@glific/flow-editor@1.19.3-7": - version "1.19.3-7" - resolved "https://registry.yarnpkg.com/@glific/flow-editor/-/flow-editor-1.19.3-7.tgz#c60d84f954ed1a4669437fdd7a84648c188eba61" - integrity sha512-5fGLm5uTgEPsJmwZ3G4z37ORsD2itJJvU1rUkaYKKYSzhcR0eVKhet2IHxinrSJY0Mn5BB6loihFaO1jeBCFCw== +"@glific/flow-editor@1.19.3-8": + version "1.19.3-8" + resolved "https://registry.yarnpkg.com/@glific/flow-editor/-/flow-editor-1.19.3-8.tgz#2ee8395b16b55734232acb221f83836cded131b7" + integrity sha512-lHqAmlYGytS5fBHhCezyHqBP6l4HLnjRRuUuNF9ORYiSoZxUjMvy/8mYL2XcUEjUrvUz8VGbukKJpLfXXcesbw== dependencies: react "^16.8.6" react-dom "^16.8.6" From d0b93846e3bce2d209944af5f1eba669bdde44cc Mon Sep 17 00:00:00 2001 From: akanshaaaa19 Date: Thu, 18 Apr 2024 16:25:49 +0530 Subject: [PATCH 10/10] package update --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d679c5595..54b9a768a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "glific-frontend", - "version": "6.0.1", + "version": "6.0.2", "private": true, "type": "module", "dependencies": {