Skip to content

Commit

Permalink
feat: terms-and-condition, contact-support,notification. (#112)
Browse files Browse the repository at this point in the history
* new design login,signup,dashboard,startup page is done

* page design has done for 1st phase and need refactorization

* unused import removed

* routing almost done

* Main container margin padding. cart border,color resolve almost

* re arranged

* form submitting going on

* form submission ndone

* # api created for budget, category, wallet.
# in frontend cin budget and wallet page ids type has changed

* # api created for budget, category, wallet.
# in frontend cin budget and wallet page ids type has changed

* Added notify stack, added title and amount range in all forms, income model frontend backend completed for get and post,

* added joi validation

* Joi validation pending task

* Joi validation pending task

* Joi validation pending task

* budget date issue dix

* budget date issue dix

* budget date issue dix

* auto comepele addted

* auto comepele added

* auto comepele added

* auto comepele issue fix, base url set

* autocomeolete task done

* autocomeolete task done

* login, sign up, tooltip, defaul year added

* login, sign up, tooltip, defaul year added

* login, sign up, tooltip, defaul year added

* yarn lock

* footer position fix

* dashboard scroller issue

* feat terms and support page crreated

* settings, contact, support, TC

* signup page button position fix

* loading does not working, so rermoved
  • Loading branch information
sp-rahul authored Nov 12, 2023
1 parent 7c386a1 commit e3b6ab6
Show file tree
Hide file tree
Showing 25 changed files with 7,870 additions and 5,325 deletions.
Binary file modified api-server-nestjs/.yarn/install-state.gz
Binary file not shown.
1 change: 0 additions & 1 deletion api-server-nestjs/src/.env-example

This file was deleted.

7 changes: 5 additions & 2 deletions api-server-nestjs/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ import { AppModule } from './app.module';
import { ValidationPipe } from '@nestjs/common';
/*import { config } from 'dotenv';
config(); // Load environment variables from .env file*/
const PORT = 5000;

async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.useGlobalPipes(new ValidationPipe());
app.enableCors();
await app.listen(5000);
await app.listen(PORT);
console.log('server is running at: ' + PORT);
}

bootstrap()
bootstrap();
Empty file added api-server-nestjs/yarn
Empty file.
12,843 changes: 7,583 additions & 5,260 deletions api-server-nestjs/yarn.lock

Large diffs are not rendered by default.

Binary file modified frontend/.yarn/install-state.gz
Binary file not shown.
6 changes: 6 additions & 0 deletions frontend/app/settings/contact-support/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import ContactSupport from '@/component/settings/ContactSupport';

const Constact = () => {
return <ContactSupport />;
};
export default Constact;
6 changes: 6 additions & 0 deletions frontend/app/settings/notification/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Nofifuactions from '@/component/settings/Notification';

const Notify = () => {
return <Nofifuactions />;
};
export default Notify;
2 changes: 1 addition & 1 deletion frontend/app/settings/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Settings from '@/component/Settings';
import Settings from '@/component/settings/Settings';

const SettingsPage = () => {
return <Settings />;
Expand Down
6 changes: 6 additions & 0 deletions frontend/app/settings/terms-and-support/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import TermsAndSupport from '@/component/settings/TermsAndSupport';

const Terms = () => {
return <TermsAndSupport />;
};
export default Terms;
83 changes: 50 additions & 33 deletions frontend/common/CustomCardForSettings.tsx
Original file line number Diff line number Diff line change
@@ -1,51 +1,68 @@
import {Button, Grid, Typography} from '@mui/material';
import {Box, Button, Grid, Typography} from '@mui/material';
import PlayArrowIcon from '@mui/icons-material/PlayArrow';
import React, {FC, useState} from 'react';
import React, {FC, useEffect, useState} from 'react';
import Drawers from '@/component/DrewerComponent';
import {useRouter} from 'next/navigation';

interface Props {
title: string;
subTitle?: string;
setting?: number;
onClk?: any;
}

const CustomCardForSetting: FC<Props> = ({title, subTitle}) => {
const handleDrewer = () => {
setState(!state);
return;
};
const [state, setState] = useState(false);
const CustomCardForSetting: FC<Props> = ({title, subTitle, setting, onClk}) => {
// const [state, setSate]=React.useState()
// const handleDrewer = () => {
// setState(!state);
// return;
// };
return (
<>
<Grid item xs={7} sx={{p: '20px'}}>
<Typography sx={{fontSize: '17px', fontWeight: '700'}}>
{title}
</Typography>
</Grid>
<Grid item xs={12}>
<Grid
item
xs={5}
container
onClick={onClk}
sx={{
display: 'flex',
alignItems: 'end',
justifyContent: 'right',
p: '20px 0px',
cursor: 'pointer',
'&:hover': {
border: '1px solid #00FF00',
color: 'black',
backgroundColor: 'lightblue',
},
borderRadius: '20px',
}}>
<Typography sx={{opacity: '.3'}}>{subTitle}</Typography>
<Button
onClick={handleDrewer}
<Grid item xs={7} sx={{p: '20px'}}>
<Typography sx={{fontSize: '17px', fontWeight: '700'}}>
{title}
</Typography>
</Grid>
<Grid
item
xs={5}
sx={{
p: '0px 0px',
maxWidth: '20px',
color: 'common.white',
':hover': {
backgroundColor: 'common.white',
},
}}
endIcon={<PlayArrowIcon sx={{color: '#000'}} />}></Button>
display: 'flex',
alignItems: 'end',
justifyContent: 'right',
p: '20px 0px',
}}>
<Typography sx={{opacity: '.3'}}>{subTitle}</Typography>
<Button
// onClick={handleDrewer}
// onClick={handleDrewer}
sx={{
p: '0px 0px',
maxWidth: '20px',
color: 'common.white',
':hover': {
backgroundColor: 'common.white',
},
}}
endIcon={<PlayArrowIcon sx={{color: '#000'}} />}></Button>

<Drawers state={state} setState={setState} />
{/*<Drawers state={state} setState={setState} />*/}
</Grid>
</Grid>
</>
</Grid>
);
};
export default CustomCardForSetting;
1 change: 0 additions & 1 deletion frontend/common/DashboardCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const DashboardCard: FC<Props> = ({title, amount}) => {
borderRadius: '10px',
width: '125px',
float: 'left',
marginRight: '12px',
mb: '7px',
}}>
<Box
Expand Down
10 changes: 3 additions & 7 deletions frontend/common/footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Box, Button, Grid, Tooltip} from '@mui/material';
import {Box, Grid, Tooltip} from '@mui/material';
import HomeRoundedIcon from '@mui/icons-material/HomeRounded';
import AddCircleOutlinedIcon from '@mui/icons-material/AddCircleOutlined';
import React, {FC, useEffect, useState} from 'react';
Expand All @@ -11,7 +11,7 @@ interface IFooter {
currentOption?: number;
newPage?: boolean;
}
const Footer: FC<IFooter> = ({currentOption, newPage}) => {
const Footer: FC<IFooter> = ({currentOption}) => {
const Router = useRouter();
const [selectNewPage, setSelectNewPage] = useState(false);
const [selectOption, setSelectOption] = useState(currentOption);
Expand All @@ -24,11 +24,7 @@ const Footer: FC<IFooter> = ({currentOption, newPage}) => {
return;
};
useEffect(() => {
console.log('Router', Router);
console.log('selectOption', selectOption);
console.log('selectNewPage', selectNewPage);
if (selectOption === 0 && !selectNewPage) {

Router.push('/dashboard', {scroll: false});
}
if (selectOption === 1 && !selectNewPage) {
Expand Down Expand Up @@ -71,7 +67,7 @@ const Footer: FC<IFooter> = ({currentOption, newPage}) => {
alignItems: 'center',
backgroundColor: '#fff',
borderTop: '2px solid #F6F5F6',
width: '429px',
width: '418px',
pb: '15px',
pt: '15px',
}}>
Expand Down
1 change: 1 addition & 0 deletions frontend/component/AddNewBudget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ const AddNewBudget = () => {
rules={{
required: true,
}}
defaultValue={currentMonth}
render={({field: {onChange, value}}) => (
<Select
sx={{
Expand Down
7 changes: 5 additions & 2 deletions frontend/component/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const DashBoard = () => {
borderBottomRightRadius: '20px',
borderBottomLeftRadius: '20px',
}}>
<Grid container spacing={1}>
<Grid container rowSpacing={1}>
<Grid item xs={12}>
<Typography
sx={{fontSize: '18px', fontWeight: '700', mt: '40px'}}>
Expand All @@ -61,6 +61,7 @@ const DashBoard = () => {
overflowX: 'auto',
// overflowY: 'hidden',
display: 'flex',
gap: '12px',
}}>
<Box>
<DashboardCard
Expand Down Expand Up @@ -236,7 +237,9 @@ const DashBoard = () => {
</Grid>
</Grid>
</Grid>
<Footer currentOption={0} />
<Grid sx={{ml: '13px'}}>
<Footer currentOption={0} />
</Grid>
</Container>
);
};
Expand Down
2 changes: 1 addition & 1 deletion frontend/component/SignUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ const Signup = ({setSelectedIndex}: any) => {
</Grid>
</Grid>
</Grid>
<Grid item xs={12} sx={{marginLeft: '15px'}}>
<Grid item xs={12}>
<SubmitButton>Create Account</SubmitButton>
</Grid>
</Grid>
Expand Down
5 changes: 3 additions & 2 deletions frontend/component/Statistics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import HomeRoundedIcon from '@mui/icons-material/HomeRounded';
import {CustomStyles} from '@/utilities/enums';
import {BarChartComponent} from '@/component/statisticsData/BarChart';
import {useRouter} from 'next/navigation';
import {timeDuration, wallets} from '@/utilities/helper';
import {timeDuration} from '@/utilities/helper';

const Statistics = () => {
const Router = useRouter();
Expand Down Expand Up @@ -227,8 +227,9 @@ const Statistics = () => {
percentage={'1%'}
/>
</Grid>
<Footer currentOption={1} />
</Grid>

<Footer currentOption={1} />
</Container>
);
};
Expand Down
30 changes: 30 additions & 0 deletions frontend/component/settings/ContactSupport.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
'use client';
import {Box, Container, Typography} from '@mui/material';
import {CustomStyles} from '@/utilities/enums';
import BackButton from '@/common/button/BackButton';

const ContactSupport = () => {
return (
<Container
maxWidth={'xs'}
disableGutters={true}
sx={{
minHeight: '100vh',
backgroundColor: '#FEFEFF',
pt: CustomStyles.CONTAINER_TOP,
pl: CustomStyles.CONTAINER_LEFT,
pr: CustomStyles.CONTAINER_RIGHT,
pb: '100px',
position: 'relative',
}}>
<Box>
<BackButton />
</Box>
<Typography sx={{fontSize: '20px', mb: '20px', fontWeight: '700'}}>
Contract support
</Typography>
<Typography>For details visit out web page</Typography>
</Container>
);
};
export default ContactSupport;
30 changes: 30 additions & 0 deletions frontend/component/settings/Notification.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
'use client';
import {Box, Container, Typography} from '@mui/material';
import {CustomStyles} from '@/utilities/enums';
import BackButton from '@/common/button/BackButton';

const Nofifuactions = () => {
return (
<Container
maxWidth={'xs'}
disableGutters={true}
sx={{
minHeight: '100vh',
backgroundColor: '#FEFEFF',
pt: CustomStyles.CONTAINER_TOP,
pl: CustomStyles.CONTAINER_LEFT,
pr: CustomStyles.CONTAINER_RIGHT,
pb: '100px',
position: 'relative',
}}>
<Box>
<BackButton />
</Box>
<Typography sx={{fontSize: '20px', mb: '20px', fontWeight: '700'}}>
Notofiaction
</Typography>
<Typography>For details visit out web page</Typography>
</Container>
);
};
export default Nofifuactions;
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
'use client';
import {Button, Container, Grid, Typography} from '@mui/material';
import Footer from '@/common/footer/Footer';
import React from 'react';
import React, {useEffect, useState} from 'react';
import CustomCardForSetting from '@/common/CustomCardForSettings';
import {CustomStyles} from '@/utilities/enums';
import {useRouter} from 'next/navigation';

const Settings = () => {
const [setting, setSetting] = useState<number>(0);
const Router = useRouter();
const habdleClick = (index: number) => {
console.log('already clicked');
setSetting(index);
};
useEffect(() => {
if (setting === 5) {
Router.push('/settings/terms-and-support', {scroll: false});
} else if (setting === 2) {
Router.push('/settings/notification', {scroll: false});
} else if (setting === 6) {
Router.push('/settings/contact-support', {scroll: false});
}
}, [setting]);
console.log('val', setting);
return (
<Container
maxWidth={'xs'}
Expand Down Expand Up @@ -45,12 +62,22 @@ const Settings = () => {
borderRadius: '40px',
}}>
<CustomCardForSetting title={'Premium'} />
<CustomCardForSetting title={'Notification'} subTitle={'USD'} />
<CustomCardForSetting
title={'Notification'}
subTitle={'USD'}
onClk={() => habdleClick(2)}
/>
<CustomCardForSetting title={'Main currency'} subTitle={'TK'} />
<CustomCardForSetting title={'Language'} />
<CustomCardForSetting title={'Export'} />
<CustomCardForSetting title={'Terms and policies'} />
<CustomCardForSetting title={'Contract support'} />
<CustomCardForSetting
title={'Terms and Support'}
onClk={() => habdleClick(5)}
/>
<CustomCardForSetting
title={'Contract support'}
onClk={() => habdleClick(6)}
/>
</Grid>
</Grid>
<Grid
Expand Down
Loading

0 comments on commit e3b6ab6

Please sign in to comment.