Merge branch 'dev' into 'features/searchBar'

Dev

See merge request sae-but2/2025-26/gestion-benevoles-association/Frontend!22
This commit is contained in:
JOSSERAND GIOVANNI p2405212 committed 2025-11-30 13:59:04 +00:00
commit f63eb6ce2f
22 files changed
+962 -244

No files matched your search

+151 -151
View File
@@ -347,14 +347,14 @@
}
},
"node_modules/@chromatic-com/storybook": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/@chromatic-com/storybook/-/storybook-4.1.2.tgz",
"integrity": "sha512-QAWGtHwib0qsP5CcO64aJCF75zpFgpKK3jNpxILzQiPK3sVo4EmnVGJVdwcZWpWrGdH8E4YkncGoitw4EXzKMg==",
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/@chromatic-com/storybook/-/storybook-4.1.3.tgz",
"integrity": "sha512-hc0HO9GAV9pxqDE6fTVOV5KeLpTiCfV8Jrpk5ogKLiIgeq2C+NPjpt74YnrZTjiK8E19fYcMP+2WY9ZtX7zHmw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@neoconfetti/react": "^1.0.0",
"chromatic": "^12.0.0",
"chromatic": "^13.3.3",
"filesize": "^10.0.12",
"jsonfile": "^6.1.0",
"strip-ansi": "^7.1.0"
@@ -1534,9 +1534,9 @@
"license": "MIT"
},
"node_modules/@storybook/addon-a11y": {
"version": "10.0.6",
"resolved": "https://registry.npmjs.org/@storybook/addon-a11y/-/addon-a11y-10.0.6.tgz",
"integrity": "sha512-XTrLd2jU9gNEpbiQAnKR1v0WQYGDq6Kob3ecOH/pcJ81nnlPJ+SCJ/mAxicvUJfpAS9S/0TL8raChh6FZ5+psA==",
"version": "10.0.8",
"resolved": "https://registry.npmjs.org/@storybook/addon-a11y/-/addon-a11y-10.0.8.tgz",
"integrity": "sha512-rXJuSfujuRqkz1v26wLttVRkXzZur3LtMTH1/K+rb1epXq305vRm/bYql0FYGvrq0idJWYo4WbU65YRig9sfuA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1548,20 +1548,20 @@
"url": "https://opencollective.com/storybook"
},
"peerDependencies": {
"storybook": "^10.0.6"
"storybook": "^10.0.8"
}
},
"node_modules/@storybook/addon-docs": {
"version": "10.0.6",
"resolved": "https://registry.npmjs.org/@storybook/addon-docs/-/addon-docs-10.0.6.tgz",
"integrity": "sha512-MrMeZyON4V08T59zOFg2Wprw/V+mMiOKsyrCf5Zb5oO9BfUb6+VqbDIETsIHdhQxOZ9H5Oi27eU3akGMgCPDMw==",
"version": "10.0.8",
"resolved": "https://registry.npmjs.org/@storybook/addon-docs/-/addon-docs-10.0.8.tgz",
"integrity": "sha512-PYuaGXGycsamK/7OrFoE4syHGy22mdqqArl67cfosRwmRxZEI9ManQK0jTjNQM9ZX14NpThMOSWNGoWLckkxog==",
"dev": true,
"license": "MIT",
"dependencies": {
"@mdx-js/react": "^3.0.0",
"@storybook/csf-plugin": "10.0.6",
"@storybook/csf-plugin": "10.0.8",
"@storybook/icons": "^1.6.0",
"@storybook/react-dom-shim": "10.0.6",
"@storybook/react-dom-shim": "10.0.8",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"ts-dedent": "^2.0.0"
@@ -1571,13 +1571,13 @@
"url": "https://opencollective.com/storybook"
},
"peerDependencies": {
"storybook": "^10.0.6"
"storybook": "^10.0.8"
}
},
"node_modules/@storybook/addon-vitest": {
"version": "10.0.6",
"resolved": "https://registry.npmjs.org/@storybook/addon-vitest/-/addon-vitest-10.0.6.tgz",
"integrity": "sha512-FSPPFhzk3OGILe/Wgn+43/liXGltn77ziZx3KaQ4f57vqcC1VgdGrNKWoS/ZhAkLGW9MXRagsYPRCSNnLbMRrg==",
"version": "10.0.8",
"resolved": "https://registry.npmjs.org/@storybook/addon-vitest/-/addon-vitest-10.0.8.tgz",
"integrity": "sha512-f9LoBPNz3cLBUWbkeYV7OFSrcONKxVT/NXeMek0/H1VwRwU/caYMoIAQzQwK4AueXkMUeba4DZfB/FvzB8mM6A==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1594,7 +1594,7 @@
"@vitest/browser": "^3.0.0 || ^4.0.0",
"@vitest/browser-playwright": "^4.0.0",
"@vitest/runner": "^3.0.0 || ^4.0.0",
"storybook": "^10.0.6",
"storybook": "^10.0.8",
"vitest": "^3.0.0 || ^4.0.0"
},
"peerDependenciesMeta": {
@@ -1613,13 +1613,13 @@
}
},
"node_modules/@storybook/builder-vite": {
"version": "10.0.6",
"resolved": "https://registry.npmjs.org/@storybook/builder-vite/-/builder-vite-10.0.6.tgz",
"integrity": "sha512-WD5BfYezOQC0B4ItY9HJg9zb4MbNjsZcfXipAQi7+i9dYNWegdAhg7Aq6arsRZ2YMMOiSpVEJhzmK08XRx+szA==",
"version": "10.0.8",
"resolved": "https://registry.npmjs.org/@storybook/builder-vite/-/builder-vite-10.0.8.tgz",
"integrity": "sha512-kaf/pUENzXxYgQMHGGPNiIk1ieb+SOMuSeLKx8wAUOlQOrzhtSH+ItACW/l43t+O6YZ8jYHoNBMF1kdQ1+Y5+w==",
"dev": true,
"license": "MIT",
"dependencies": {
"@storybook/csf-plugin": "10.0.6",
"@storybook/csf-plugin": "10.0.8",
"ts-dedent": "^2.0.0"
},
"funding": {
@@ -1627,14 +1627,14 @@
"url": "https://opencollective.com/storybook"
},
"peerDependencies": {
"storybook": "^10.0.6",
"storybook": "^10.0.8",
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0"
}
},
"node_modules/@storybook/csf-plugin": {
"version": "10.0.6",
"resolved": "https://registry.npmjs.org/@storybook/csf-plugin/-/csf-plugin-10.0.6.tgz",
"integrity": "sha512-etPIKPoLAhG8wTRZrmvOiDi70CstkE8Y5fYuYhffThCP8tc2RwHEuwLrsK/6Mf9PAkTmIk/CjYG+Rp2qLqNNtg==",
"version": "10.0.8",
"resolved": "https://registry.npmjs.org/@storybook/csf-plugin/-/csf-plugin-10.0.8.tgz",
"integrity": "sha512-OtLUWHIm3SDGtclQn6Mdd/YsWizLBgdEBRAdekGtwI/TvICfT7gpWYIycP53v2t9ufu2MIXjsxtV2maZKs8sZg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1647,7 +1647,7 @@
"peerDependencies": {
"esbuild": "*",
"rollup": "*",
"storybook": "^10.0.6",
"storybook": "^10.0.8",
"vite": "*",
"webpack": "*"
},
@@ -1688,14 +1688,14 @@
}
},
"node_modules/@storybook/react": {
"version": "10.0.6",
"resolved": "https://registry.npmjs.org/@storybook/react/-/react-10.0.6.tgz",
"integrity": "sha512-17SMthmwPDzX6Ex5MNnXhDS8DirGyo2I9g8VV/VtnXFWIl2r/+ZSAHjAM4NG0Tv3qia7l/jQxwL1YKk9qVRZxw==",
"version": "10.0.8",
"resolved": "https://registry.npmjs.org/@storybook/react/-/react-10.0.8.tgz",
"integrity": "sha512-PkuPb8sAqmjjkowSzm3rutiSuETvZI2F8SnjbHE6FRqZWWK4iFoaUrQbrg5kpPAtX//xIrqkdFwlbmQ3skhiPA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@storybook/global": "^5.0.0",
"@storybook/react-dom-shim": "10.0.6"
"@storybook/react-dom-shim": "10.0.8"
},
"funding": {
"type": "opencollective",
@@ -1704,7 +1704,7 @@
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"storybook": "^10.0.6",
"storybook": "^10.0.8",
"typescript": ">= 4.9.x"
},
"peerDependenciesMeta": {
@@ -1714,9 +1714,9 @@
}
},
"node_modules/@storybook/react-dom-shim": {
"version": "10.0.6",
"resolved": "https://registry.npmjs.org/@storybook/react-dom-shim/-/react-dom-shim-10.0.6.tgz",
"integrity": "sha512-UdPSWwgo7WQg8vWIxT379pwrC2uFZX9u12Enap8//zVCJNZYHmjTLbV2P+pQ4zD0UFcqcBljptJEbu7FUMYx+A==",
"version": "10.0.8",
"resolved": "https://registry.npmjs.org/@storybook/react-dom-shim/-/react-dom-shim-10.0.8.tgz",
"integrity": "sha512-ojuH22MB9Sz6rWbhTmC5IErZr0ZADbZijtPteUdydezY7scORT00UtbNoBcG0V6iVjdChgDtSKw2KHUUfchKqg==",
"dev": true,
"license": "MIT",
"funding": {
@@ -1726,20 +1726,20 @@
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"storybook": "^10.0.6"
"storybook": "^10.0.8"
}
},
"node_modules/@storybook/react-vite": {
"version": "10.0.6",
"resolved": "https://registry.npmjs.org/@storybook/react-vite/-/react-vite-10.0.6.tgz",
"integrity": "sha512-zDnOk89LDOpN0yhTCYRb8bkm6LdchGMfcCxKLQhEnSmkMmPwXsj/CADUc1Oipqih7D0JR/gxuadx+3y41znmSg==",
"version": "10.0.8",
"resolved": "https://registry.npmjs.org/@storybook/react-vite/-/react-vite-10.0.8.tgz",
"integrity": "sha512-HS2X4qlitrZr3/sN2+ollxAaNE813IasZRE8lOez1Ey1ISGBtYIb9rmJs82MK35+yDM0pHdiDjkFMD4SkNYh2g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@joshwooding/vite-plugin-react-docgen-typescript": "0.6.1",
"@rollup/pluginutils": "^5.0.2",
"@storybook/builder-vite": "10.0.6",
"@storybook/react": "10.0.6",
"@storybook/builder-vite": "10.0.8",
"@storybook/react": "10.0.8",
"empathic": "^2.0.0",
"magic-string": "^0.30.0",
"react-docgen": "^8.0.0",
@@ -1753,7 +1753,7 @@
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"storybook": "^10.0.6",
"storybook": "^10.0.8",
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0"
}
},
@@ -1946,14 +1946,14 @@
"license": "MIT"
},
"node_modules/@typescript-eslint/project-service": {
"version": "8.46.3",
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.3.tgz",
"integrity": "sha512-Fz8yFXsp2wDFeUElO88S9n4w1I4CWDTXDqDr9gYvZgUpwXQqmZBr9+NTTql5R3J7+hrJZPdpiWaB9VNhAKYLuQ==",
"version": "8.47.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.47.0.tgz",
"integrity": "sha512-2X4BX8hUeB5JcA1TQJ7GjcgulXQ+5UkNb0DL8gHsHUHdFoiCTJoYLTpib3LtSDPZsRET5ygN4qqIWrHyYIKERA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/tsconfig-utils": "^8.46.3",
"@typescript-eslint/types": "^8.46.3",
"@typescript-eslint/tsconfig-utils": "^8.47.0",
"@typescript-eslint/types": "^8.47.0",
"debug": "^4.3.4"
},
"engines": {
@@ -1968,14 +1968,14 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "8.46.3",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.3.tgz",
"integrity": "sha512-FCi7Y1zgrmxp3DfWfr+3m9ansUUFoy8dkEdeQSgA9gbm8DaHYvZCdkFRQrtKiedFf3Ha6VmoqoAaP68+i+22kg==",
"version": "8.47.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.47.0.tgz",
"integrity": "sha512-a0TTJk4HXMkfpFkL9/WaGTNuv7JWfFTQFJd6zS9dVAjKsojmv9HT55xzbEpnZoY+VUb+YXLMp+ihMLz/UlZfDg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.46.3",
"@typescript-eslint/visitor-keys": "8.46.3"
"@typescript-eslint/types": "8.47.0",
"@typescript-eslint/visitor-keys": "8.47.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -1986,9 +1986,9 @@
}
},
"node_modules/@typescript-eslint/tsconfig-utils": {
"version": "8.46.3",
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.3.tgz",
"integrity": "sha512-GLupljMniHNIROP0zE7nCcybptolcH8QZfXOpCfhQDAdwJ/ZTlcaBOYebSOZotpti/3HrHSw7D3PZm75gYFsOA==",
"version": "8.47.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.47.0.tgz",
"integrity": "sha512-ybUAvjy4ZCL11uryalkKxuT3w3sXJAuWhOoGS3T/Wu+iUu1tGJmk5ytSY8gbdACNARmcYEB0COksD2j6hfGK2g==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2003,9 +2003,9 @@
}
},
"node_modules/@typescript-eslint/types": {
"version": "8.46.3",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.3.tgz",
"integrity": "sha512-G7Ok9WN/ggW7e/tOf8TQYMaxgID3Iujn231hfi0Pc7ZheztIJVpO44ekY00b7akqc6nZcvregk0Jpah3kep6hA==",
"version": "8.47.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.47.0.tgz",
"integrity": "sha512-nHAE6bMKsizhA2uuYZbEbmp5z2UpffNrPEqiKIeN7VsV6UY/roxanWfoRrf6x/k9+Obf+GQdkm0nPU+vnMXo9A==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2017,16 +2017,16 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "8.46.3",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.3.tgz",
"integrity": "sha512-f/NvtRjOm80BtNM5OQtlaBdM5BRFUv7gf381j9wygDNL+qOYSNOgtQ/DCndiYi80iIOv76QqaTmp4fa9hwI0OA==",
"version": "8.47.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.47.0.tgz",
"integrity": "sha512-k6ti9UepJf5NpzCjH31hQNLHQWupTRPhZ+KFF8WtTuTpy7uHPfeg2NM7cP27aCGajoEplxJDFVCEm9TGPYyiVg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/project-service": "8.46.3",
"@typescript-eslint/tsconfig-utils": "8.46.3",
"@typescript-eslint/types": "8.46.3",
"@typescript-eslint/visitor-keys": "8.46.3",
"@typescript-eslint/project-service": "8.47.0",
"@typescript-eslint/tsconfig-utils": "8.47.0",
"@typescript-eslint/types": "8.47.0",
"@typescript-eslint/visitor-keys": "8.47.0",
"debug": "^4.3.4",
"fast-glob": "^3.3.2",
"is-glob": "^4.0.3",
@@ -2085,16 +2085,16 @@
}
},
"node_modules/@typescript-eslint/utils": {
"version": "8.46.3",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.3.tgz",
"integrity": "sha512-VXw7qmdkucEx9WkmR3ld/u6VhRyKeiF1uxWwCy/iuNfokjJ7VhsgLSOTjsol8BunSw190zABzpwdNsze2Kpo4g==",
"version": "8.47.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.47.0.tgz",
"integrity": "sha512-g7XrNf25iL4TJOiPqatNuaChyqt49a/onq5YsJ9+hXeugK+41LVg7AxikMfM02PC6jbNtZLCJj6AUcQXJS/jGQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/eslint-utils": "^4.7.0",
"@typescript-eslint/scope-manager": "8.46.3",
"@typescript-eslint/types": "8.46.3",
"@typescript-eslint/typescript-estree": "8.46.3"
"@typescript-eslint/scope-manager": "8.47.0",
"@typescript-eslint/types": "8.47.0",
"@typescript-eslint/typescript-estree": "8.47.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -2109,13 +2109,13 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "8.46.3",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.3.tgz",
"integrity": "sha512-uk574k8IU0rOF/AjniX8qbLSGURJVUCeM5e4MIMKBFFi8weeiLrG1fyQejyLXQpRZbU/1BuQasleV/RfHC3hHg==",
"version": "8.47.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.47.0.tgz",
"integrity": "sha512-SIV3/6eftCy1bNzCQoPmbWsRLujS8t5iDIZ4spZOBHqrM+yfX2ogg8Tt3PDTAVKw3sSCiUgg30uOAvK2r9zGjQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.46.3",
"@typescript-eslint/types": "8.47.0",
"eslint-visitor-keys": "^4.2.1"
},
"engines": {
@@ -2148,14 +2148,14 @@
}
},
"node_modules/@vitest/browser": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/@vitest/browser/-/browser-4.0.8.tgz",
"integrity": "sha512-oG6QJAR0d7S5SDnIYZwjxCj/a5fhbp9ZE7GtMgZn+yCUf4CxtqbBV6aXyg0qmn8nbUWT+rGuXL2ZB6qDBUjv/A==",
"version": "4.0.10",
"resolved": "https://registry.npmjs.org/@vitest/browser/-/browser-4.0.10.tgz",
"integrity": "sha512-irO+aGxYx/rAhjEBLsGPO4JQ8dA+A43enIST0j4xQ2kYHatHi9tUcxkRRGpClGuUVU42mi+iQsFFzd4xxpoV3g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@vitest/mocker": "4.0.8",
"@vitest/utils": "4.0.8",
"@vitest/mocker": "4.0.10",
"@vitest/utils": "4.0.10",
"magic-string": "^0.30.21",
"pixelmatch": "7.1.0",
"pngjs": "^7.0.0",
@@ -2167,18 +2167,18 @@
"url": "https://opencollective.com/vitest"
},
"peerDependencies": {
"vitest": "4.0.8"
"vitest": "4.0.10"
}
},
"node_modules/@vitest/browser-playwright": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/@vitest/browser-playwright/-/browser-playwright-4.0.8.tgz",
"integrity": "sha512-MUi0msIAPXcA2YAuVMcssrSYP/yylxLt347xyTC6+ODl0c4XQFs0d2AN3Pc3iTa0pxIGmogflUV6eogXpPbJeA==",
"version": "4.0.10",
"resolved": "https://registry.npmjs.org/@vitest/browser-playwright/-/browser-playwright-4.0.10.tgz",
"integrity": "sha512-pm7Hl7BNyluox+uGJPnT7vCRDSI+ibHcWQRtnCACAZWxD6/b2gN+8pO0qTDPHpxDSTPKDS5sT2dKTHLcr+lsng==",
"dev": true,
"license": "MIT",
"dependencies": {
"@vitest/browser": "4.0.8",
"@vitest/mocker": "4.0.8",
"@vitest/browser": "4.0.10",
"@vitest/mocker": "4.0.10",
"tinyrainbow": "^3.0.3"
},
"funding": {
@@ -2186,7 +2186,7 @@
},
"peerDependencies": {
"playwright": "*",
"vitest": "4.0.8"
"vitest": "4.0.10"
},
"peerDependenciesMeta": {
"playwright": {
@@ -2195,14 +2195,14 @@
}
},
"node_modules/@vitest/coverage-v8": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.0.8.tgz",
"integrity": "sha512-wQgmtW6FtPNn4lWUXi8ZSYLpOIb92j3QCujxX3sQ81NTfQ/ORnE0HtK7Kqf2+7J9jeveMGyGyc4NWc5qy3rC4A==",
"version": "4.0.10",
"resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.0.10.tgz",
"integrity": "sha512-g+brmtoKa/sAeIohNJnnWhnHtU6GuqqVOSQ4SxDIPcgZWZyhJs5RmF5LpqXs8Kq64lANP+vnbn5JLzhLj/G56g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@bcoe/v8-coverage": "^1.0.2",
"@vitest/utils": "4.0.8",
"@vitest/utils": "4.0.10",
"ast-v8-to-istanbul": "^0.3.8",
"debug": "^4.4.3",
"istanbul-lib-coverage": "^3.2.2",
@@ -2217,8 +2217,8 @@
"url": "https://opencollective.com/vitest"
},
"peerDependencies": {
"@vitest/browser": "4.0.8",
"vitest": "4.0.8"
"@vitest/browser": "4.0.10",
"vitest": "4.0.10"
},
"peerDependenciesMeta": {
"@vitest/browser": {
@@ -2295,13 +2295,13 @@
}
},
"node_modules/@vitest/mocker": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.0.8.tgz",
"integrity": "sha512-9FRM3MZCedXH3+pIh+ME5Up2NBBHDq0wqwhOKkN4VnvCiKbVxddqH9mSGPZeawjd12pCOGnl+lo/ZGHt0/dQSg==",
"version": "4.0.10",
"resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.0.10.tgz",
"integrity": "sha512-e2OfdexYkjkg8Hh3L9NVEfbwGXq5IZbDovkf30qW2tOh7Rh9sVtmSr2ztEXOFbymNxS4qjzLXUQIvATvN4B+lg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@vitest/spy": "4.0.8",
"@vitest/spy": "4.0.10",
"estree-walker": "^3.0.3",
"magic-string": "^0.30.21"
},
@@ -2332,9 +2332,9 @@
}
},
"node_modules/@vitest/pretty-format": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.0.8.tgz",
"integrity": "sha512-qRrjdRkINi9DaZHAimV+8ia9Gq6LeGz2CgIEmMLz3sBDYV53EsnLZbJMR1q84z1HZCMsf7s0orDgZn7ScXsZKg==",
"version": "4.0.10",
"resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.0.10.tgz",
"integrity": "sha512-99EQbpa/zuDnvVjthwz5bH9o8iPefoQZ63WV8+bsRJZNw3qQSvSltfut8yu1Jc9mqOYi7pEbsKxYTi/rjaq6PA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2345,13 +2345,13 @@
}
},
"node_modules/@vitest/runner": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.0.8.tgz",
"integrity": "sha512-mdY8Sf1gsM8hKJUQfiPT3pn1n8RF4QBcJYFslgWh41JTfrK1cbqY8whpGCFzBl45LN028g0njLCYm0d7XxSaQQ==",
"version": "4.0.10",
"resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.0.10.tgz",
"integrity": "sha512-EXU2iSkKvNwtlL8L8doCpkyclw0mc/t4t9SeOnfOFPyqLmQwuceMPA4zJBa6jw0MKsZYbw7kAn+gl7HxrlB8UQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@vitest/utils": "4.0.8",
"@vitest/utils": "4.0.10",
"pathe": "^2.0.3"
},
"funding": {
@@ -2359,13 +2359,13 @@
}
},
"node_modules/@vitest/snapshot": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.0.8.tgz",
"integrity": "sha512-Nar9OTU03KGiubrIOFhcfHg8FYaRaNT+bh5VUlNz8stFhCZPNrJvmZkhsr1jtaYvuefYFwK2Hwrq026u4uPWCw==",
"version": "4.0.10",
"resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.0.10.tgz",
"integrity": "sha512-2N4X2ZZl7kZw0qeGdQ41H0KND96L3qX1RgwuCfy6oUsF2ISGD/HpSbmms+CkIOsQmg2kulwfhJ4CI0asnZlvkg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@vitest/pretty-format": "4.0.8",
"@vitest/pretty-format": "4.0.10",
"magic-string": "^0.30.21",
"pathe": "^2.0.3"
},
@@ -2374,9 +2374,9 @@
}
},
"node_modules/@vitest/spy": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.0.8.tgz",
"integrity": "sha512-nvGVqUunyCgZH7kmo+Ord4WgZ7lN0sOULYXUOYuHr55dvg9YvMz3izfB189Pgp28w0vWFbEEfNc/c3VTrqrXeA==",
"version": "4.0.10",
"resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.0.10.tgz",
"integrity": "sha512-AsY6sVS8OLb96GV5RoG8B6I35GAbNrC49AO+jNRF9YVGb/g9t+hzNm1H6kD0NDp8tt7VJLs6hb7YMkDXqu03iw==",
"dev": true,
"license": "MIT",
"funding": {
@@ -2384,13 +2384,13 @@
}
},
"node_modules/@vitest/utils": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.0.8.tgz",
"integrity": "sha512-pdk2phO5NDvEFfUTxcTP8RFYjVj/kfLSPIN5ebP2Mu9kcIMeAQTbknqcFEyBcC4z2pJlJI9aS5UQjcYfhmKAow==",
"version": "4.0.10",
"resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.0.10.tgz",
"integrity": "sha512-kOuqWnEwZNtQxMKg3WmPK1vmhZu9WcoX69iwWjVz+jvKTsF1emzsv3eoPcDr6ykA3qP2bsCQE7CwqfNtAVzsmg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@vitest/pretty-format": "4.0.8",
"@vitest/pretty-format": "4.0.10",
"tinyrainbow": "^3.0.3"
},
"funding": {
@@ -2693,9 +2693,9 @@
}
},
"node_modules/chromatic": {
"version": "12.2.0",
"resolved": "https://registry.npmjs.org/chromatic/-/chromatic-12.2.0.tgz",
"integrity": "sha512-GswmBW9ZptAoTns1BMyjbm55Z7EsIJnUvYKdQqXIBZIKbGErmpA+p4c0BYA+nzw5B0M+rb3Iqp1IaH8TFwIQew==",
"version": "13.3.4",
"resolved": "https://registry.npmjs.org/chromatic/-/chromatic-13.3.4.tgz",
"integrity": "sha512-TR5rvyH0ESXobBB3bV8jc87AEAFQC7/n+Eb4XWhJz6hW3YNxIQPVjcbgLv+a4oKHEl1dUBueWSoIQsOVGTd+RQ==",
"dev": true,
"license": "MIT",
"bin": {
@@ -3042,9 +3042,9 @@
}
},
"node_modules/eslint-plugin-storybook": {
"version": "10.0.6",
"resolved": "https://registry.npmjs.org/eslint-plugin-storybook/-/eslint-plugin-storybook-10.0.6.tgz",
"integrity": "sha512-llPShAqO86PgjswUDXwkxq1hGBjM7NiZE+nScbTjM3NVx0XwqbSZ+FRV2p5nv6vrZeREfhhY/KJF2WuSaYkXiQ==",
"version": "10.0.8",
"resolved": "https://registry.npmjs.org/eslint-plugin-storybook/-/eslint-plugin-storybook-10.0.8.tgz",
"integrity": "sha512-ZKEMFhF/z/HRVvIgnEIYG2uAqmuLbkebUdHH3DpGHE64GPgk+KozcpqnD6zNk5vJ407bFmcWsGinBc2zi74f0g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3052,7 +3052,7 @@
},
"peerDependencies": {
"eslint": ">=8",
"storybook": "^10.0.6"
"storybook": "^10.0.8"
}
},
"node_modules/eslint-scope": {
@@ -3386,9 +3386,9 @@
}
},
"node_modules/glob": {
"version": "10.4.5",
"resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz",
"integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==",
"version": "10.5.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz",
"integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -4776,9 +4776,9 @@
"license": "MIT"
},
"node_modules/storybook": {
"version": "10.0.6",
"resolved": "https://registry.npmjs.org/storybook/-/storybook-10.0.6.tgz",
"integrity": "sha512-s3qY17stuSxU9TFdSHWF2VWJiDKrhZsdlM9M9/APBLT+3kbTlfCPuaNONE0UETgz5tiZLIrC9K4RYjJ8c6PHPA==",
"version": "10.0.8",
"resolved": "https://registry.npmjs.org/storybook/-/storybook-10.0.8.tgz",
"integrity": "sha512-vQMufKKA9TxgoEDHJv3esrqUkjszuuRiDkThiHxENFPdQawHhm2Dei+iwNRwH5W671zTDy9iRT9P1KDjcU5Iyw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5329,19 +5329,19 @@
}
},
"node_modules/vitest": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/vitest/-/vitest-4.0.8.tgz",
"integrity": "sha512-urzu3NCEV0Qa0Y2PwvBtRgmNtxhj5t5ULw7cuKhIHh3OrkKTLlut0lnBOv9qe5OvbkMH2g38G7KPDCTpIytBVg==",
"version": "4.0.10",
"resolved": "https://registry.npmjs.org/vitest/-/vitest-4.0.10.tgz",
"integrity": "sha512-2Fqty3MM9CDwOVet/jaQalYlbcjATZwPYGcqpiYQqgQ/dLC7GuHdISKgTYIVF/kaishKxLzleKWWfbSDklyIKg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@vitest/expect": "4.0.8",
"@vitest/mocker": "4.0.8",
"@vitest/pretty-format": "4.0.8",
"@vitest/runner": "4.0.8",
"@vitest/snapshot": "4.0.8",
"@vitest/spy": "4.0.8",
"@vitest/utils": "4.0.8",
"@vitest/expect": "4.0.10",
"@vitest/mocker": "4.0.10",
"@vitest/pretty-format": "4.0.10",
"@vitest/runner": "4.0.10",
"@vitest/snapshot": "4.0.10",
"@vitest/spy": "4.0.10",
"@vitest/utils": "4.0.10",
"debug": "^4.4.3",
"es-module-lexer": "^1.7.0",
"expect-type": "^1.2.2",
@@ -5369,10 +5369,10 @@
"@edge-runtime/vm": "*",
"@types/debug": "^4.1.12",
"@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0",
"@vitest/browser-playwright": "4.0.8",
"@vitest/browser-preview": "4.0.8",
"@vitest/browser-webdriverio": "4.0.8",
"@vitest/ui": "4.0.8",
"@vitest/browser-playwright": "4.0.10",
"@vitest/browser-preview": "4.0.10",
"@vitest/browser-webdriverio": "4.0.10",
"@vitest/ui": "4.0.10",
"happy-dom": "*",
"jsdom": "*"
},
@@ -5407,17 +5407,17 @@
}
},
"node_modules/vitest/node_modules/@vitest/expect": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.0.8.tgz",
"integrity": "sha512-Rv0eabdP/xjAHQGr8cjBm+NnLHNoL268lMDK85w2aAGLFoVKLd8QGnVon5lLtkXQCoYaNL0wg04EGnyKkkKhPA==",
"version": "4.0.10",
"resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.0.10.tgz",
"integrity": "sha512-3QkTX/lK39FBNwARCQRSQr0TP9+ywSdxSX+LgbJ2M1WmveXP72anTbnp2yl5fH+dU6SUmBzNMrDHs80G8G2DZg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@standard-schema/spec": "^1.0.0",
"@types/chai": "^5.2.2",
"@vitest/spy": "4.0.8",
"@vitest/utils": "4.0.8",
"chai": "^6.2.0",
"@vitest/spy": "4.0.10",
"@vitest/utils": "4.0.10",
"chai": "^6.2.1",
"tinyrainbow": "^3.0.3"
},
"funding": {
@@ -5425,9 +5425,9 @@
}
},
"node_modules/vitest/node_modules/chai": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/chai/-/chai-6.2.0.tgz",
"integrity": "sha512-aUTnJc/JipRzJrNADXVvpVqi6CO0dn3nx4EVPxijri+fj3LUUDyZQOgVeW54Ob3Y1Xh9Iz8f+CgaCl8v0mn9bA==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/chai/-/chai-6.2.1.tgz",
"integrity": "sha512-p4Z49OGG5W/WBCPSS/dH3jQ73kD6tiMmUM+bckNK6Jr5JHMG3k9bg/BvKR8lKmtVBKmOiuVaV2ws8s9oSbwysg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1,47 +1,22 @@
/*import { useState } from "react";
import login from "../../utils/login.js";
import getUser from "../../utils/getUser.js";
import styles from "./form.module.css";
function LoginForm({ className }) {
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
async function handleSubmit(e) {
e.preventDefault();
await login(email, password);
getUser();
}
return (
<div className={`${className} ${"glassCard"}`}>
<div className={styles.formgroup}>
<input type="email" id="email" value={email} placeholder="Adresse mail" onChange={e => setEmail(e.target.value)} required/>
</div>
import { useState, useContext } from "react";
import styles from "./loginForm.module.css";
import Button from "../ui/button/button.jsx";
import Input from "../ui/input/input.jsx";
import { useNavigate } from "react-router";
import { AuthContext } from "../../contexts/auth/AuthContext.js";
<div className={styles.formgroup}>
<input type="password" id="password" value={password} placeholder="Mot de passe" onChange={e => setPassword(e.target.value)} required/>
<br/>
</div>
<div className={styles.logButton} >
<button className={styles.loginButton} onClick={e => handleSubmit(e)}>Se connecter</button>
</div>
</div>
);
}
export default LoginForm;*/
import { useState } from "react";
import login from "../../utils/login.js";
import getUser from "../../utils/getUser.js";
import styles from "./form.module.css";
function LoginForm({ className }) {
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [showPassword, setShowPassword] = useState(false);
let navigate = useNavigate();
const { login } = useContext(AuthContext);
async function handleSubmit(e) {
e.preventDefault();
await login(email, password);
getUser();
navigate("/");
}
const toggleShowPassword = () => {
@@ -51,27 +26,22 @@ function LoginForm({ className }) {
return (
<div className={`${className} ${"glassCard"}`}>
<div className={styles.formgroup}>
<input
<Input
type="email"
id="email"
className={styles.input}
value={email}
placeholder="Adresse mail"
onChange={e => setEmail(e.target.value)}
required
style={{ width: '100%' }}
/>
</div>
<div className={styles.formgroup}>
<div style={{ position: 'relative', width: '100%' }}>
<input
<Input
type={showPassword ? "text" : "password"}
id="password"
className={styles.input}
value={password}
placeholder="Mot de passe"
onChange={e => setPassword(e.target.value)}
required
style={{ width: '100%', paddingRight: '40px' }}
style={{ width: '100%' }}
/>
<button
type="button"
@@ -92,8 +62,9 @@ function LoginForm({ className }) {
</button>
</div>
</div>
<div className={styles.logButton}>
<button className={styles.loginButton} onClick={handleSubmit}>Se connecter</button>
<Button onClick={handleSubmit} variant={"default"}> Se connecter </Button>
</div>
</div>
);
+3
View File
@@ -0,0 +1,3 @@
import { createContext } from "react";
export const AuthContext = createContext(null);
+37
View File
@@ -0,0 +1,37 @@
import { useState, useEffect } from "react";
import loginFunction from "../../utils/login.js";
import getUser from "../../utils/getUser.js";
import { AuthContext } from "./AuthContext";
export function AuthProvider({ children }) {
const [user, setUser] = useState(null);
const [loading, setLoading] = useState(true);
useEffect(() => {
(async () => {
const u = await getUser();
setUser(u);
setLoading(false);
})();
}, []);
const login = async (email, password) => {
const res = await loginFunction(email, password);
if (!res || res.status !== 200) throw new Error("Login error");
const u = await getUser();
setUser(u);
return res;
};
const logout = async () => {
// TODO: Appeller fonction logout
setUser(null);
};
return (
<AuthContext.Provider value={{ user, loading, login, logout }}>
{children}
</AuthContext.Provider>
);
}
+6 -5
View File
@@ -17,16 +17,17 @@
-moz-osx-font-smoothing: grayscale;
}
@media screen and (max-width: 768px) {
.content{
padding: 0.7rem;
z-index:1;
}
}
.content {
padding: 1.5rem;
z-index: 1;
}
a {
font-weight: 500;
color: #646cff;
+8
View File
@@ -2,10 +2,18 @@ import { Outlet } from "react-router";
import Footer from "./components/Footer/Footer.jsx"
import Header from "./components/Header/Header.jsx";
import Background from "./components/background/background.jsx";
import { Navigate } from "react-router";
import { useContext} from "react";
import { AuthContext } from "./contexts/auth/AuthContext.js";
function Layout(){
const { user, loading } = useContext(AuthContext);
if (loading) return <p>Loading</p>;
if (!user) return <Navigate to="/login" />;
return (
<div>
<Background>
+4 -1
View File
@@ -3,10 +3,13 @@ import { createRoot } from 'react-dom/client'
import './index.css'
import { RouterProvider } from "react-router";
import router from './router';
import { AuthProvider } from "./contexts/auth/authProvider.jsx";
createRoot(document.getElementById('root')).render(
<StrictMode>
<RouterProvider router={router} />
<AuthProvider>
<RouterProvider router={router} />
</AuthProvider>
</StrictMode>,
)
+7 -4
View File
@@ -1,12 +1,15 @@
import styles from "./LoginPage.module.css";
import LoginForm from "../../components/form/form.jsx";
import LoginForm from "../../components/loginform/loginForm.jsx";
import Background from "../../components/background/background.jsx";
function LoginPage() {
return (
return <Background>
<div className={styles.container}>
<LoginForm />
<LoginForm />
</div>
);
</Background>
}
export default LoginPage;
+1
View File
@@ -9,6 +9,7 @@
align-items: center;
padding: 20px;
border-radius:12px;
margin-left: 33.3%;
}
+110
View File
@@ -0,0 +1,110 @@
import React, { useState } from "react";
import styles from "./ProfilePage.module.css";
function Event({ title,date, tasks }) {
const [isExpanded, setIsExpanded] = useState(false);
const toggleExpand = () => {
setIsExpanded(!isExpanded);
};
return (
<div className={`${styles.event} glassCard`}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start' }}>
<div style={{display:'flex', flexDirection:'column'}}>
<h3>{title}</h3>
<p style={{ fontSize: '0.8rem', color: '#666', margin: '0 0 0 0' }}>{date}</p>
</div>
<button
onClick={toggleExpand}
style={{
background: 'none',
border: 'none',
cursor: 'pointer',
fontSize: '1.2rem',
}}
>
{isExpanded ? '▼' : '▶'}
</button>
</div>
<ul
className={`${styles.eventTasks} ${isExpanded ? styles.expanded : ''}`}
>
{tasks.map((task, index) => (
<li key={index}>-- {task}</li>
))}
</ul>
</div>
);
}
function ProfilePage() {
return (
<div className={styles.container}>
<div className={`${styles.profileboard} glassCard`}>
<div className={styles.contentWrapper}>
<div className={styles.profilePictureContainer}>
<img
src="../src/assets/react.svg"
alt="Photo de profil"
className={styles.profilePicture}
/>
</div>
<div className={styles.description}>
<h2>LEBLOND Malo</h2>
<div className={styles.topDescription}>
<div className={styles.infoBlock}>
<p><strong>Role :</strong> Président</p>
<p><strong>Membre depuis :</strong> 2019</p>
</div>
<div className={styles.infoBlock}>
<p><strong>Mail :</strong> mailpro@gmail.com</p>
<p><strong>Téléphone :</strong> 08 67 87 32 21</p>
</div>
<button href="/../UpdateProfile.jsx">M</button>
</div>
<h2>Vos Événements :</h2>
<Event
title="Titre event 1"
date="04/11/2025"
tasks={["Votre tâche 1", "Votre tâche 2", "Votre tâche 3"]}
/>
<Event
title="Titre event 2"
date="04/11/2025"
tasks={["Votre tâche 1", "Votre tâche 2", "Votre tâche 3"]}
/>
<Event
title="Titre event 3"
date="04/11/2025"
tasks={["Votre tâche 1", "Votre tâche 2", "Votre tâche 3"]}
/>
<Event
title="Titre event 4"
date="04/11/2025"
tasks={["Votre tâche 1", "Votre tâche 2", "Votre tâche 3"]}
/>
<Event
title="Titre event 5"
date="04/11/2025"
tasks={["Votre tâche 1", "Votre tâche 2", "Votre tâche 3"]}
/>
<Event
title="Titre event 6"
date="04/11/2025"
tasks={["Votre tâche 1", "Votre tâche 2", "Votre tâche 3"]}
/>
<Event
title="Titre event 7"
date="04/11/2025"
tasks={["Votre tâche 1", "Votre tâche 2", "Votre tâche 3"]}
/>
</div>
</div>
</div>
</div>
);
}
export default ProfilePage;
+158
View File
@@ -0,0 +1,158 @@
.container {
width: 100%;
padding: 10px;
box-sizing: border-box;
}
.profileboard {
width: 100%;
padding: 15px;
border-radius: 10px;
box-sizing: border-box;
}
.contentWrapper {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
}
.profilePictureContainer {
width: 120px;
height: 120px;
margin-bottom: 15px;
}
.profilePicture {
width: 100%;
height: 100%;
border-radius: 50%;
object-fit: cover;
}
.description {
width: 100%;
text-align: left;
margin-left:4%;
}
.topDescription {
display: flex;
flex-direction: column;
gap: 10px;
margin-bottom: 15px;
}
.infoBlock {
width: 100%;
background: rgba(255, 255, 255, 0.1);
padding: 10px;
border-radius: 5px;
}
.event {
width: 100%;
padding: 12px;
margin-bottom: 10px;
border-radius: 8px;
}
.eventTasks {
max-height: 0;
overflow: hidden;
transition: max-height 0.3s ease-out, opacity 0.2s ease;
opacity: 0;
padding-left: 20px;
}
.eventTasks.expanded {
max-height: 500px;
opacity: 1;
margin-top: 10px;
}
.description h2{
font-size:30px;
margin-bottom: 2%;
}
.profilePicture{
width:90%;
}
/* Tablette (768px et plus) */
@media screen and (min-width: 768px) {
.contentWrapper {
flex-direction: row;
justify-content: flex-start;
align-items: flex-start;
}
.profilePictureContainer {
width: 150px;
height: 150px;
margin-right: 20px;
margin-bottom: 0;
}
.description {
width: calc(100% - 170px);
margin-left:4%;
}
.topDescription {
flex-direction: row;
justify-content: space-between;
}
.infoBlock {
width: 48%;
}
.event {
padding: 15px;
}
.description h2{
font-size:30px;
margin-bottom: 2%;
}
.profilePicture{
width:90%;
}
}
.description button{
width:50px;
height:50px;
}
/* Desktop (1024px et plus) */
@media screen and (min-width: 1024px) {
.container {
max-width: 100%;
margin: 0 auto;
padding: 20px;
}
.profileboard {
padding: 25px;
}
.profilePictureContainer {
width: 30%;
height:auto;
}
.profilePicture{
width:90%;
}
.description {
width: calc(100% - 200px);
margin-left:4%;
}
.event {
padding: 18px;
}
.description h2{
font-size:30px;
margin-bottom: 2%;
}
}
+105
View File
@@ -0,0 +1,105 @@
import styles from "./RegisterPage.module.css";
import Background from "../../components/background/background.jsx";
import Input from "../../components/ui/input/input.jsx";
import Button from "../../components/ui/button/button.jsx";
import { useState } from "react";
import register from "../../utils/register.js";
import { useNavigate } from "react-router";
function RegisterPage() {
const navigate = useNavigate();
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
const [name, setName] = useState("");
const [lastName, setLastName] = useState("");
const [showPassword, setShowPassword] = useState(false);
async function handleSubmit(e) {
e.preventDefault();
const res = await register(email, password, name, lastName);
if (!res || res.status !== 200) throw new Error("Register error");
navigate("/login");
}
return <Background>
<div className={styles.container}>
<div className={"glassCard"}>
<h1>Créer un compte</h1>
<div className={styles.formGroup}>
<Input
value={name}
placeholder="Prénom"
onChange={e => setName(e.target.value)}
style={{ width: '100%' }}
/>
</div>
<div className={styles.formGroup}>
<Input
value={lastName}
placeholder="Nom"
onChange={e => setLastName(e.target.value)}
style={{ width: '100%' }}
/>
</div>
<div className={styles.formGroup}>
<Input
type="email"
value={email}
placeholder="Adresse mail"
onChange={e => setEmail(e.target.value)}
style={{ width: '100%' }}
/>
</div>
<div className={styles.formGroup}>
<div style={{ position: 'relative', width: '100%' }}>
<Input
type={showPassword ? "text" : "password"}
value={password}
placeholder="Mot de passe"
onChange={e => setPassword(e.target.value)}
style={{ width: '100%' }}
/>
<button
type="button"
onClick={() => setShowPassword(!showPassword)}
style={{
position: 'absolute',
width: '30px',
right: '10px',
top: '50%',
transform: 'translateY(-50%)',
background: 'none',
border: 'none',
cursor: 'pointer',
fontSize: '16px',
}}
>
{showPassword ? '👁️' : '🔒'}
</button>
</div>
</div>
<div className={styles.logButton}>
<Button variant={"transparent"} onClick={() => navigate("/login")}>Vous avez déjà un compte ?</Button>
<Button variant={"default"} onClick={handleSubmit}> Se connecter </Button>
</div>
</div>
</div>
</Background>
}
export default RegisterPage;
@@ -0,0 +1,29 @@
.container {
position: relative;
z-index: 2;
display: flex;
width: 30%;
justify-content: center;
align-items: center;
padding: 20px;
border-radius:12px;
}
:global(.glassCard) {
--glass-bg: #ffffff9f;
}
.logButton{
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
margin-top: 12px;
}
.formGroup{
margin-top:23px;
}
h1 {
overflow: visible;
text-align: center;
}
+108
View File
@@ -0,0 +1,108 @@
import React, { useState } from "react";
import styles from "./VolunteersPage.module.css";
function Volunteer({ name, role, since, email, phone, photo }) {
const [isExpanded, setIsExpanded] = useState(false);
const toggleExpand = () => {
setIsExpanded(!isExpanded);
};
return (
<div className={`${styles.profileboard} glassCard`}>
<div className={styles.mainContent}>
{!isExpanded ? (
<div className={styles.basicInfo}>
<h2>{name}</h2>
<p><strong>Rôle :</strong> {role}</p>
<p><strong>Membre depuis :</strong> {since}</p>
</div>
) : (
<div className={styles.expandedContent}>
<div className={styles.profilePictureContainer}>
<img src={photo} alt={`${name}'s profile`} className={styles.profilePicture} />
</div>
<div className={styles.textInfo}>
<div className={styles.basicInfo}>
<h2>{name}</h2>
<p><strong>Rôle :</strong> {role}</p>
<p><strong>Membre depuis :</strong> {since}</p>
</div>
<div className={styles.contactInfo}>
<p><strong>Email :</strong> {email}</p>
<p><strong>Téléphone :</strong> {phone}</p>
</div>
</div>
</div>
)}
<button
className={`${styles.expandButton} glassCard`}
onClick={toggleExpand}
>
{isExpanded ? "▲" : "▼"}
</button>
{isExpanded && (
<div className="voirPlus">
<a href="#" className={styles.voirPlus}>VOIR PLUS</a>
</div>
)}
</div>
</div>
);
}
function VolunteerPage() {
const volunteers = [
{
name: "LEBLOND Malo",
role: "Président",
since: "2019",
email: "malo.leblond@example.com",
phone: "08 67 87 32 21",
photo: "../src/assets/react.svg",
},
{
name: "DUPONT Jean",
role: "Bénévole",
since: "2020",
email: "jean.dupont@example.com",
phone: "06 12 34 56 78",
photo: "../src/assets/react.svg",
},
{
name: "MARTIN Sophie",
role: "Bénévole",
since: "2021",
email: "sophie.martin@example.com",
phone: "06 87 65 43 21",
photo: "../src/assets/react.svg",
},
{
name: "MARTIN Sophie",
role: "Bénévole",
since: "2021",
email: "sophie.martin@example.com",
phone: "06 87 65 43 21",
photo: "../src/assets/react.svg",
},
];
return (
<div className={styles.container}>
{volunteers.map((volunteer, index) => (
<Volunteer
key={index}
name={volunteer.name}
role={volunteer.role}
since={volunteer.since}
email={volunteer.email}
phone={volunteer.phone}
photo={volunteer.photo}
/>
))}
</div>
);
}
export default VolunteerPage;
@@ -0,0 +1,125 @@
.container {
width: 100%;
padding: 10px;
box-sizing: border-box;
margin-top: 50px;
}
.profileboard {
width: 100%;
padding: 15px;
border-radius: 10px;
box-sizing: border-box;
margin-top: 3%;
position: relative;
}
.mainContent {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: flex-start;
width: 100%;
}
.basicInfo {
flex: 1;
}
.expandedContent {
display: flex;
flex-direction: row;
align-items: flex-start;
width: 100%;
}
.profilePictureContainer {
width: 120px;
height: 120px;
margin-right: 20px;
}
.profilePicture {
width: 100%;
height: 100%;
border-radius: 50%;
object-fit: cover;
}
.textInfo {
display: flex;
flex-direction: column;
flex: 1;
}
.contactInfo {
margin-top: 10px;
}
.contactInfo p {
margin: 5px 0;
}
.expandButton {
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
background: transparent;
border: none;
font-size: 16px;
margin-left: 10px;
position: absolute;
top: 10px;
right: 10px;
}
.voirPlus {
position: absolute;
bottom: 10px;
right: 10px;
color: #007bff;
text-decoration: none;
font-weight: bold;
cursor: pointer;
}
.voirPlus:hover {
text-decoration: underline;
}
@media screen and (min-width: 768px) {
.profilePictureContainer {
width: 150px;
height: 150px;
}
.voirPlus{
text-align: right;
}
}
@media screen and (min-width: 1024px) {
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
margin-top:50px;
margin-bottom: 50px;
}
.profileboard {
padding: 25px;
}
.profilePictureContainer {
width: 200px;
height: auto;
}
}
+19
View File
@@ -2,9 +2,20 @@ import { createBrowserRouter } from "react-router";
import Layout from "./layout.jsx";
import HomePage from "./pages/Home/HomePage";
import LoginPage from "./pages/Login/LoginPage";
import RegisterPage from "./pages/Register/RegisterPage.jsx";
import VolunteersPage from "./pages/Volunteers/VolunteersPage";
import ProfilePage from "./pages/Profile/ProfilePage";
import EventsPage from "./pages/Events/EventsPage.jsx";
const router = createBrowserRouter([
{
path: "/login",
Component: LoginPage,
},
{
path: "/register",
Component: RegisterPage,
},
{
path: "/",
Component: Layout,
@@ -17,9 +28,17 @@ const router = createBrowserRouter([
path: "/login",
Component: LoginPage,
},
{
path:"/profile",
Component:ProfilePage,
},
{
path: "/events",
Component: EventsPage,
},
{
path: "/volunteers",
Component: VolunteersPage,
}
]
}
+19 -10
View File
@@ -1,12 +1,21 @@
export default async function getUser() {
await fetch('http://localhost:8000/api/me', {
method: 'GET',
credentials: 'include',
headers: {
'Accept': 'application/json'
try {
const res = await fetch('http://localhost:80/api/users/me', {
method: 'GET',
credentials: 'include',
headers: {
'Accept': 'application/json'
}
});
if (!res.ok) {
throw new Error(`Erreur serveur : ${res.status}`);
}
})
.then(res => res.json())
.then(data => console.log('Utilisateur connecté :', data))
.catch(err => console.error('Erreur :', err));
}
const data = await res.json();
return data;
} catch (err) {
console.error('Erreur :', err);
return null;
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
export default async function getUserNotifications() {
try {
const response = await fetch(
'http://localhost:8000/api/users/1/notifications',
'http://localhost:80/api/users/1/notifications',
{
method: 'GET',
credentials: 'include',
+1 -1
View File
@@ -1,5 +1,5 @@
export default async function getXSRFToken() {
const response = await fetch('http://localhost:8000/sanctum/csrf-cookie', {
const response = await fetch('http://localhost:80/sanctum/csrf-cookie', {
method: 'GET',
credentials: 'include'
});
+25 -27
View File
@@ -3,31 +3,29 @@ import getXSRFToken from "./getXSRF.js";
export default async function login(email, password) {
const csrfToken = await getXSRFToken();
await fetch('http://localhost:8000/api/users/login', {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json',
'X-XSRF-TOKEN': csrfToken,
'Accept': 'application/json'
},
body: JSON.stringify({
email: email,
password: password
})
})
.then(response => {
console.log('Code HTTP :', response.status);
if (!response.ok) {
throw new Error(`Erreur HTTP ${response.status}`);
}
return response.json();
})
.then(data => {
console.log('Connexion réussie ! Données utilisateur :', data);
})
.catch(error => {
console.error('Erreur lors de la connexion :', error.message);
try {
const response = await fetch('http://localhost:80/api/users/login', {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json',
'X-XSRF-TOKEN': csrfToken,
'Accept': 'application/json'
},
body: JSON.stringify({ email, password })
});
}
console.log('Code HTTP :', response.status);
if (!response.ok) {
throw new Error(`Erreur HTTP ${response.status}`);
}
const data = await response.json();
console.log('Connexion réussie ! Données utilisateur :', data);
return { status: response.status, data };
} catch (error) {
return error;
}
}
+30
View File
@@ -0,0 +1,30 @@
import getXSRFToken from "./getXSRF.js";
export default async function register(email, password, name, lastname) {
const csrfToken = await getXSRFToken();
try {
const response = await fetch('http://localhost:80/api/users/register', {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json',
'X-XSRF-TOKEN': csrfToken,
'Accept': 'application/json'
},
body: JSON.stringify({ email, password, name, lastname }),
});
console.log('Code HTTP :', response.status);
if (!response.ok) {
throw new Error(`Erreur HTTP ${response.status}`);
}
const data = await response.json();
return { status: response.status, data };
} catch (error) {
return error;
}
}