From b085edf97958709349cc20089d53116afef8312b Mon Sep 17 00:00:00 2001 From: upendraTekdi Date: Thu, 22 Aug 2024 14:17:42 +0530 Subject: [PATCH] Task #225335: update changes Rename header,remove forget pass,pause or remove notification call upon user create, delete leraner , undefiend fixed below of classname --- config.json | 2 +- cypress/e2e/app.cy.js | 2 +- public/locales/en/common.json | 2 +- src/components/AddLeanerModal.tsx | 46 ++++++++++----------- src/components/LearnersListItem.tsx | 3 ++ src/pages/_app.tsx | 2 +- src/pages/centers/[cohortId]/index.tsx | 5 ++- src/pages/login.tsx | 55 +++++++++++++++++--------- 8 files changed, 69 insertions(+), 48 deletions(-) diff --git a/config.json b/config.json index 3805a6b9..7fbba500 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,5 @@ { - "appName": "Pratham SCP", + "appName": "OBLF", "languages": [ { "label": "English", diff --git a/cypress/e2e/app.cy.js b/cypress/e2e/app.cy.js index 5c739d4b..586f97d9 100644 --- a/cypress/e2e/app.cy.js +++ b/cypress/e2e/app.cy.js @@ -5,7 +5,7 @@ context('App', () => { it('verify the title', () => { cy.clearLocalStorage(); - cy.title().should('eq', 'Pratham SCP Teachers app'); + cy.title().should('eq', 'OBLF'); }); it('CSSLocator', () => { diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 7959d703..cb51e413 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -403,7 +403,7 @@ "ENTER_CONTACT_NUMBER": "Enter Contact Number", "HOW_WAS_LEARNER_MOBILISED": "How Was the Learner Mobilised?", "SECOND_CHANCE_ALUMNI": "Second Chance Alumni", - "PRATHAM_TEAM_MEMBER": "Pratham Team Member", + "PRATHAM_TEAM_MEMBER": "OBLF Team Member", "OTHER": "Other", "MALE": "Male", "FEMALE": "Female", diff --git a/src/components/AddLeanerModal.tsx b/src/components/AddLeanerModal.tsx index 0775037c..5e7b8f26 100644 --- a/src/components/AddLeanerModal.tsx +++ b/src/components/AddLeanerModal.tsx @@ -242,29 +242,29 @@ const AddLearnerModal: React.FC = ({ const sendTo = { receipients: [userEmail], }; - if (replacements && sendTo) { - const response = await sendCredentialService({ - isQueue, - context, - key, - replacements, - email: sendTo, - }); - if (response?.result[0]?.data[0]?.status === 'success') { - showToastMessage( - t('COMMON.USER_CREDENTIAL_SEND_SUCCESSFULLY'), - 'success' - ); - } else { - showToastMessage( - t('COMMON.USER_CREDENTIALS_WILL_BE_SEND_SOON'), - 'success' - ); - } - setOpenModal(true); - } else { - showToastMessage(t('COMMON.SOMETHING_WENT_WRONG'), 'error'); - } + // if (replacements && sendTo) { + // const response = await sendCredentialService({ + // isQueue, + // context, + // key, + // replacements, + // email: sendTo, + // }); + // if (response?.result[0]?.data[0]?.status === 'success') { + // showToastMessage( + // t('COMMON.USER_CREDENTIAL_SEND_SUCCESSFULLY'), + // 'success' + // ); + // } else { + // showToastMessage( + // t('COMMON.USER_CREDENTIALS_WILL_BE_SEND_SOON'), + // 'success' + // ); + // } + // setOpenModal(true); + // } else { + // showToastMessage(t('COMMON.SOMETHING_WENT_WRONG'), 'error'); + // } } } // onClose(); diff --git a/src/components/LearnersListItem.tsx b/src/components/LearnersListItem.tsx index 81897092..913880a6 100644 --- a/src/components/LearnersListItem.tsx +++ b/src/components/LearnersListItem.tsx @@ -356,6 +356,9 @@ const LearnersListItem: React.FC = ({ const handleMenuOpen = (event: any) => { setAnchorEl(event.currentTarget); + setCohortLearnerDeleteId(cohortMembershipId); + setReassignId(userId); + }; const renderCustomContent = () => { diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 137c1c15..5c3db170 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -137,7 +137,7 @@ function App({ Component, pageProps }: AppProps) { } `} - Pratham SCP Teachers app + OBLF {/* */} diff --git a/src/pages/centers/[cohortId]/index.tsx b/src/pages/centers/[cohortId]/index.tsx index edd47a94..206be2c1 100644 --- a/src/pages/centers/[cohortId]/index.tsx +++ b/src/pages/centers/[cohortId]/index.tsx @@ -188,8 +188,9 @@ const TeachingCenterDetails = () => { ); cohortData.address = - `${toPascalCase(district?.value)}, ${toPascalCase(state?.value)}` || - ''; + district?.value && state?.value + ? `${toPascalCase(district?.value)}, ${toPascalCase(state?.value)}` + : ''; } setCohortDetails(cohortData); setCohortName(cohortData?.name); diff --git a/src/pages/login.tsx b/src/pages/login.tsx index 0f2aa406..79cdb72d 100644 --- a/src/pages/login.tsx +++ b/src/pages/login.tsx @@ -132,7 +132,7 @@ const LoginPage = () => { action: 'login-success', category: 'Login Page', label: 'Login Success', - value: userResponse?.userId + value: userResponse?.userId, }); localStorage.setItem('state', userResponse?.state); localStorage.setItem('district', userResponse?.district); @@ -169,7 +169,7 @@ const LoginPage = () => { action: 'login-fail', category: 'Login Page', label: 'Login Fail', - value: error.response + value: error.response, }); } else { console.error('Error:', error); @@ -247,14 +247,30 @@ const LoginPage = () => { - - - Login Image + + + Login Image
@@ -273,12 +289,11 @@ const LoginPage = () => { '@media (min-width: 900px)': { width: '100%', borderRadius: '16px', - boxShadow: 'rgba(99, 99, 99, 0.2) 0px 2px 8px 0px' + boxShadow: 'rgba(99, 99, 99, 0.2) 0px 2px 8px 0px', }, }} > { onMouseDown={handleMouseDownPassword} edge="end" > - {showPassword ? : } + {showPassword ? ( + + ) : ( + + )} ), @@ -378,7 +397,7 @@ const LoginPage = () => { /> - { + {/* { { {t('LOGIN_PAGE.FORGOT_PASSWORD')} - } + } */} setRememberMe(e.target.checked)} @@ -429,8 +448,8 @@ const LoginPage = () => { ref={loginButtonRef} sx={{ '@media (min-width: 900px)': { - width: '50%' - } + width: '50%', + }, }} > {t('LOGIN_PAGE.LOGIN')} @@ -441,9 +460,7 @@ const LoginPage = () => {
-
- ); };