Skip to content

Commit

Permalink
Task #225335: update changes Rename header,remove forget pass,pause o…
Browse files Browse the repository at this point in the history
…r remove notification call upon user create, delete leraner , undefiend fixed below of classname
  • Loading branch information
upendraTekdi committed Aug 22, 2024
1 parent 9d249a9 commit b085edf
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 48 deletions.
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"appName": "Pratham SCP",
"appName": "OBLF",
"languages": [
{
"label": "English",
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/app.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
2 changes: 1 addition & 1 deletion public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
46 changes: 23 additions & 23 deletions src/components/AddLeanerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,29 +242,29 @@ const AddLearnerModal: React.FC<AddLearnerModalProps> = ({
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();
Expand Down
3 changes: 3 additions & 0 deletions src/components/LearnersListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,9 @@ const LearnersListItem: React.FC<LearnerListProps> = ({

const handleMenuOpen = (event: any) => {
setAnchorEl(event.currentTarget);
setCohortLearnerDeleteId(cohortMembershipId);
setReassignId(userId);

};

const renderCustomContent = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function App({ Component, pageProps }: AppProps) {
}
`}</style>
<Head>
<title>Pratham SCP Teachers app</title>
<title>OBLF</title>
</Head>
<CssVarsProvider theme={customTheme}>
{/* <ModeToggle /> */}
Expand Down
5 changes: 3 additions & 2 deletions src/pages/centers/[cohortId]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
55 changes: 36 additions & 19 deletions src/pages/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -247,14 +247,30 @@ const LoginPage = () => {
</Box>
</Box>

<Grid container spacing={2}
justifyContent={'center'} px={'30px'} alignItems={'center'}>
<Grid sx={{
'@media (max-width: 900px)': {
display: 'none'
},
}} item xs={12} sm={12} md={6}>
<Image className='login-img' src={loginImg} alt="Login Image" layout="responsive" />
<Grid
container
spacing={2}
justifyContent={'center'}
px={'30px'}
alignItems={'center'}
>
<Grid
sx={{
'@media (max-width: 900px)': {
display: 'none',
},
}}
item
xs={12}
sm={12}
md={6}
>
<Image
className="login-img"
src={loginImg}
alt="Login Image"
layout="responsive"
/>
</Grid>
<Grid item xs={12} sm={12} md={6}>
<form onSubmit={handleFormSubmit}>
Expand All @@ -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',
},
}}
>
<Box

sx={{
width: '100%',
'@media (max-width: 700px)': {
Expand Down Expand Up @@ -364,7 +379,11 @@ const LoginPage = () => {
onMouseDown={handleMouseDownPassword}
edge="end"
>
{showPassword ? <VisibilityOff /> : <Visibility />}
{showPassword ? (
<VisibilityOff />
) : (
<Visibility />
)}
</IconButton>
</InputAdornment>
),
Expand All @@ -378,7 +397,7 @@ const LoginPage = () => {
/>
</Box>

{
{/* {
<Box marginTop={'1rem'} marginLeft={'0.8rem'}>
<Link
sx={{ color: theme.palette.secondary.main }}
Expand All @@ -389,7 +408,7 @@ const LoginPage = () => {
{t('LOGIN_PAGE.FORGOT_PASSWORD')}
</Link>
</Box>
}
} */}
<Box marginTop={'1.2rem'} className="remember-me-checkbox">
<Checkbox
onChange={(e) => setRememberMe(e.target.checked)}
Expand Down Expand Up @@ -429,8 +448,8 @@ const LoginPage = () => {
ref={loginButtonRef}
sx={{
'@media (min-width: 900px)': {
width: '50%'
}
width: '50%',
},
}}
>
{t('LOGIN_PAGE.LOGIN')}
Expand All @@ -441,9 +460,7 @@ const LoginPage = () => {
</Box>
</form>
</Grid>

</Grid>

</Box>
);
};
Expand Down

0 comments on commit b085edf

Please sign in to comment.