Skip to content

Commit c50e79d

Browse files
committed
some fixes
1 parent 89c68d1 commit c50e79d

34 files changed

+796
-115
lines changed

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.1
1+
2.1.2

app/.env

+6-2
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,9 @@ JWT_TTL=86400
1212
###< lexik/jwt-authentication-bundle ###
1313

1414
###> nelmio/cors-bundle ###
15-
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
16-
###< nelmio/cors-bundle ###
15+
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1|mybudget\.dcorroyer\.fr)(:[0-9]+)?$'
16+
###< nelmio/cors-bundle ###
17+
18+
###> sentry/sentry-symfony ###
19+
SENTRY_DSN="https://c7d1e04ef4d6e7a0bb60dae3e51117c1@o4508924680077312.ingest.de.sentry.io/4508924682043472"
20+
###< sentry/sentry-symfony ###

app/assets/api/axiosInstance.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
import axios, { AxiosError, AxiosRequestConfig } from 'axios'
22

3+
const getBaseUrl = () => {
4+
const hostname = window.location.hostname
5+
6+
if (hostname === 'mybudget.dcorroyer.fr') {
7+
return 'https://mybudget.dcorroyer.fr'
8+
}
9+
10+
return 'https://mybudget.web.localhost'
11+
}
12+
313
const axiosInstance = axios.create({
4-
baseURL: 'https://mybudget.web.localhost',
14+
baseURL: getBaseUrl(),
515
headers: {
616
'Content-Type': 'application/json',
717
},

app/assets/components/NotFound.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { Button, Container, Group, Text, Title } from '@mantine/core'
44

55
import { Link } from 'react-router-dom'
66

7-
import classes from './notfound.module.css'
7+
import classes from './NotFound.module.css'
88

9-
import { Illustration } from './illustration'
9+
import { Illustration } from './Illustration'
1010

1111
const NotFound: React.FC = () => {
1212
return (

app/assets/components/sidebar.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import { useMediaQuery } from '@mantine/hooks'
77
import { notifications } from '@mantine/notifications'
88
import { IconChartLine, IconLogout, IconWallet } from '@tabler/icons-react'
99

10-
import Logo from './logo'
11-
import classes from './sidebar.module.css'
10+
import Logo from './Logo'
11+
import classes from './Sidebar.module.css'
1212

1313
const data = [
1414
{ icon: IconChartLine, label: 'Épargne', path: '/' },

app/assets/features/auth/pages/LoginPage.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
import { notifications } from '@mantine/notifications'
1818

1919
import { usePostApiLogin } from '@/api/generated/authentication/authentication'
20-
import { loginFormSchema, loginFormType } from '@/features/auth/schemas/LoginSchema'
20+
import { loginFormSchema, loginFormType } from '@/features/auth/schemas/loginSchema'
2121

2222
const Login: React.FC = () => {
2323
const navigate = useNavigate()

app/assets/features/auth/pages/RegisterPage.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { notifications } from '@mantine/notifications'
1818

1919
import { usePostApiLogin, usePostApiRegister } from '@/api/generated/authentication/authentication'
2020
import { PostApiRegister400 } from '@/api/models'
21-
import { registerFormSchema, registerFormType } from '@/features/auth/schemas/RegisterSchema'
21+
import { registerFormSchema, registerFormType } from '@/features/auth/schemas/registerSchema'
2222

2323
const Register: React.FC = () => {
2424
const navigate = useNavigate()

app/assets/features/savings/components/SavingsChart.tsx

+38-12
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,45 @@ export const SavingsChart: React.FC<SavingsChartProps> = ({ data, height }) => {
1717
balance: balance.balance,
1818
}))
1919

20+
const maxValue = Math.max(...chartData.map((item) => item.balance)) * 1.1
21+
2022
return (
21-
<>
22-
<LineChart
23-
h={height || (isMobile ? 200 : 300)}
24-
data={chartData}
25-
dataKey='date'
26-
series={[{ name: 'balance', color: 'blue' }]}
27-
curveType='natural'
28-
withYAxis={false}
29-
xAxisProps={{ padding: { left: isMobile ? 5 : 30, right: isMobile ? 5 : 30 } }}
30-
withPointLabels
31-
withTooltip={false}
23+
<div className='savings-chart-container' style={{ position: 'relative' }}>
24+
<div
25+
style={{
26+
position: 'absolute',
27+
top: '0',
28+
left: '0',
29+
right: '0',
30+
bottom: '20px',
31+
backgroundColor: 'var(--mantine-color-gray-0)',
32+
borderRadius: '8px',
33+
zIndex: 0,
34+
}}
3235
/>
33-
</>
36+
37+
{/* Le graphique avec un fond transparent */}
38+
<div style={{ position: 'relative', zIndex: 1 }}>
39+
<LineChart
40+
h={height || (isMobile ? 200 : 300)}
41+
data={chartData}
42+
dataKey='date'
43+
series={[{ name: 'balance', color: 'blue' }]}
44+
curveType='natural'
45+
withYAxis={true}
46+
yAxisProps={{
47+
domain: [0, maxValue],
48+
width: 0,
49+
tickFormatter: () => '',
50+
}}
51+
xAxisProps={{
52+
padding: { left: isMobile ? 5 : 30, right: isMobile ? 5 : 30 },
53+
}}
54+
gridAxis='none'
55+
withPointLabels
56+
withTooltip={false}
57+
/>
58+
</div>
59+
</div>
3460
)
3561
}

app/assets/features/savings/components/SavingsChartSection.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,18 @@ export const SavingsChartSection = ({
5858
</Card.Section>
5959

6060
<Card.Section withBorder inheritPadding px='xl' py='md'>
61-
<div style={{ position: 'relative', height: '300px' }}>
62-
{showSkeleton && <Skeleton height={300} radius='md' animate={true} />}
61+
<div style={{ position: 'relative', height: '350px', width: '100%', overflow: 'visible' }}>
62+
{showSkeleton && <Skeleton height={350} radius='md' animate={true} />}
6363

6464
{showPrevData && prevData && prevData.data && (
6565
<div style={{ position: 'absolute', top: 0, left: 0, right: 0 }}>
66-
<SavingsChart data={prevData.data} height={300} />
66+
<SavingsChart data={prevData.data} height={350} />
6767
</div>
6868
)}
6969

7070
{showCurrentData && savingsData && savingsData.data && (
7171
<div style={{ position: 'absolute', top: 0, left: 0, right: 0 }}>
72-
<SavingsChart data={savingsData.data} height={300} />
72+
<SavingsChart data={savingsData.data} height={350} />
7373
</div>
7474
)}
7575
</div>

app/composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"phpdocumentor/reflection-docblock": "^5.4",
2323
"phpstan/phpdoc-parser": "^1.29",
2424
"runtime/frankenphp-symfony": "^0.2.0",
25+
"sentry/sentry-symfony": "^5.2",
2526
"symfony/asset": "~7.1.0",
2627
"symfony/console": "~7.1.0",
2728
"symfony/dotenv": "~7.1.0",

0 commit comments

Comments
 (0)