diff --git a/.vs/JTT_CrM/v17/.suo b/.vs/JTT_CrM/v17/.suo new file mode 100644 index 0000000..e5837e9 Binary files /dev/null and b/.vs/JTT_CrM/v17/.suo differ diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..4b33db9 --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,9 @@ +{ + "ExpandedNodes": [ + "", + "\\src", + "\\src\\components" + ], + "SelectedNode": "\\src\\components\\Menu.js", + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 0000000..b9dc2e1 Binary files /dev/null and b/.vs/slnx.sqlite differ diff --git a/Doc/commande.txt b/Doc/commande.txt new file mode 100644 index 0000000..5e46291 --- /dev/null +++ b/Doc/commande.txt @@ -0,0 +1,12 @@ +cd server-api + +npm install --save body-parser +npm install --save cors +npm install --save mysql +npm install --save express +npm install -g nodemon +npm install --save-dev nodemon + + +npm install --save axios +npm install @mui/material @emotion/react @emotion/styled \ No newline at end of file diff --git a/README.md b/README.md index 5b89ad8..72a1067 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ [](https://codefirst.iut.uca.fr/sonar/dashboard?id=jtt_crm) [](https://codefirst.iut.uca.fr/sonar/dashboard?id=jtt_crm) [](https://codefirst.iut.uca.fr/sonar/dashboard?id=jtt_crm) -[](https://codefirst.iut.uca.fr/sonar/dashboard?id=jtt_crm) [](https://codefirst.iut.uca.fr/sonar/dashboard?id=jtt_crm) diff --git a/package-lock.json b/package-lock.json index 0af3c07..6583b16 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,12 +15,12 @@ "@fullcalendar/list": "^5.11.3", "@fullcalendar/react": "^5.11.2", "@fullcalendar/timegrid": "^5.11.3", - "@mui/material": "^5.10.13", + "@mui/material": "^5.10.15", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", "addeventlistener": "^2.0.0", - "axios": "^1.1.3", + "axios": "^1.2.0", "chart": "^0.1.2", "chart.js": "^3.9.1", "crypto-js": "^4.1.1", @@ -1813,11 +1813,11 @@ } }, "node_modules/@babel/runtime": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.19.0.tgz", - "integrity": "sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA==", + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.1.tgz", + "integrity": "sha512-mrzLkl6U9YLF8qpqI7TB82PESyEGjm/0Ly91jG575eVxMMlb8fYfOXFZIJ8XfLrJZQbm7dlKry2bJmXBUEkdFg==", "dependencies": { - "regenerator-runtime": "^0.13.4" + "regenerator-runtime": "^0.13.10" }, "engines": { "node": ">=6.9.0" @@ -3234,14 +3234,14 @@ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==" }, "node_modules/@mui/base": { - "version": "5.0.0-alpha.105", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.105.tgz", - "integrity": "sha512-4IPBcJQIgVVXQvN6DQMoCHed52GBtwSqYs0jD0dDcMR3o76AodQtpEeWFz3p7mJoc6f/IHBl9U6jEfL1r/kM4g==", + "version": "5.0.0-alpha.107", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.107.tgz", + "integrity": "sha512-HX/BD8CSe+Y/dpbZ5aKJScJhKQ/Hw6du2yd68Upv2cO67bwixyZ64h3aNcdDu7RQzI7nrZQm0JykffP1Orgq0g==", "dependencies": { - "@babel/runtime": "^7.19.0", + "@babel/runtime": "^7.20.1", "@emotion/is-prop-valid": "^1.2.0", - "@mui/types": "^7.2.0", - "@mui/utils": "^5.10.9", + "@mui/types": "^7.2.1", + "@mui/utils": "^5.10.15", "@popperjs/core": "^2.11.6", "clsx": "^1.2.1", "prop-types": "^15.8.1", @@ -3271,25 +3271,25 @@ "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" }, "node_modules/@mui/core-downloads-tracker": { - "version": "5.10.13", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.10.13.tgz", - "integrity": "sha512-zWkWPV/SaNdsIdxAWiuVGZ+Ue3BkfSIlU/BFIrJmuUcwiIa7gQsbI/DOpj1KzLvqZhdEe2wC1aG4nCHfzgc1Hg==", + "version": "5.10.15", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.10.15.tgz", + "integrity": "sha512-xFcS0LpdF0Q1qJrrNsYUv9PU+ovvhCEPTOMw2jcpEFtl3CA87dLpvztORR5oE2UBFjWF7qLQLOwboQU1+xC7Cw==", "funding": { "type": "opencollective", "url": "https://opencollective.com/mui" } }, "node_modules/@mui/material": { - "version": "5.10.13", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.10.13.tgz", - "integrity": "sha512-TkkT1rNc0/hhL4/+zv4gYcA6egNWBH/1Tz+azoTnQIUdZ32fgwFI2pFX2KVJNTt30xnLznxDWtTv7ilmJQ52xw==", - "dependencies": { - "@babel/runtime": "^7.19.0", - "@mui/base": "5.0.0-alpha.105", - "@mui/core-downloads-tracker": "^5.10.13", - "@mui/system": "^5.10.13", - "@mui/types": "^7.2.0", - "@mui/utils": "^5.10.9", + "version": "5.10.15", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.10.15.tgz", + "integrity": "sha512-OqoHfUtVMppFHgk2M95j+pR8MWfLKhzSdz4aKEfIpFrHIHbYang+oY7Iy/exX+vqpZSEGHgHQ0cGX0hGTGx9cg==", + "dependencies": { + "@babel/runtime": "^7.20.1", + "@mui/base": "5.0.0-alpha.107", + "@mui/core-downloads-tracker": "^5.10.15", + "@mui/system": "^5.10.15", + "@mui/types": "^7.2.1", + "@mui/utils": "^5.10.15", "@types/react-transition-group": "^4.4.5", "clsx": "^1.2.1", "csstype": "^3.1.1", @@ -3329,12 +3329,12 @@ "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" }, "node_modules/@mui/private-theming": { - "version": "5.10.9", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.10.9.tgz", - "integrity": "sha512-BN7/CnsVPVyBaQpDTij4uV2xGYHHHhOgpdxeYLlIu+TqnsVM7wUeF+37kXvHovxM6xmL5qoaVUD98gDC0IZnHg==", + "version": "5.10.15", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.10.15.tgz", + "integrity": "sha512-l7CsUj5kYdYz118/JHSvZZTYE9WnIWwln0td5jYATnYw9cNX4ygD6AkKOUYZ1Jitp1YLJqcO8jCP9E5/Nql9IQ==", "dependencies": { - "@babel/runtime": "^7.19.0", - "@mui/utils": "^5.10.9", + "@babel/runtime": "^7.20.1", + "@mui/utils": "^5.10.15", "prop-types": "^15.8.1" }, "engines": { @@ -3355,12 +3355,12 @@ } }, "node_modules/@mui/styled-engine": { - "version": "5.10.8", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.10.8.tgz", - "integrity": "sha512-w+y8WI18EJV6zM/q41ug19cE70JTeO6sWFsQ7tgePQFpy6ToCVPh0YLrtqxUZXSoMStW5FMw0t9fHTFAqPbngw==", + "version": "5.10.14", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.10.14.tgz", + "integrity": "sha512-bgKdM57ExogWpIfhL/ngSlzF4FhbH00vYF+Y5VALTob4uslFqje0xzoWmbfcCn4cZt2NXxZJIwhsq4vzo5itlw==", "dependencies": { - "@babel/runtime": "^7.19.0", - "@emotion/cache": "^11.10.3", + "@babel/runtime": "^7.20.1", + "@emotion/cache": "^11.10.5", "csstype": "^3.1.1", "prop-types": "^15.8.1" }, @@ -3386,15 +3386,15 @@ } }, "node_modules/@mui/system": { - "version": "5.10.13", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.10.13.tgz", - "integrity": "sha512-Xzx26Asu5fVlm0ucm+gnJmeX4Y1isrpVDvqxX4yJaOT7Fzmd8Lfq9ih3QMfZajns5LMtUiOuCQlVFRtUG5IY7A==", - "dependencies": { - "@babel/runtime": "^7.19.0", - "@mui/private-theming": "^5.10.9", - "@mui/styled-engine": "^5.10.8", - "@mui/types": "^7.2.0", - "@mui/utils": "^5.10.9", + "version": "5.10.15", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.10.15.tgz", + "integrity": "sha512-WZmgmpYTMXAaD++QetaaM/miwhNh1JJY1dH7MJH/3Fuv3r3gnhfzE6A55lDqWxkQmlWUO2DCn/cnNZ0FkSdZUg==", + "dependencies": { + "@babel/runtime": "^7.20.1", + "@mui/private-theming": "^5.10.15", + "@mui/styled-engine": "^5.10.14", + "@mui/types": "^7.2.1", + "@mui/utils": "^5.10.15", "clsx": "^1.2.1", "csstype": "^3.1.1", "prop-types": "^15.8.1" @@ -3425,9 +3425,9 @@ } }, "node_modules/@mui/types": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.0.tgz", - "integrity": "sha512-lGXtFKe5lp3UxTBGqKI1l7G8sE2xBik8qCfrLHD5olwP/YU0/ReWoWT7Lp1//ri32dK39oPMrJN8TgbkCSbsNA==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.1.tgz", + "integrity": "sha512-c5mSM7ivD8EsqK6HUi9hQPr5V7TJ/IRThUQ9nWNYPdhCGriTSQV4vL6DflT99LkM+wLiIS1rVjphpEWxERep7A==", "peerDependencies": { "@types/react": "*" }, @@ -3438,11 +3438,11 @@ } }, "node_modules/@mui/utils": { - "version": "5.10.9", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.10.9.tgz", - "integrity": "sha512-2tdHWrq3+WCy+G6TIIaFx3cg7PorXZ71P375ExuX61od1NOAJP1mK90VxQ8N4aqnj2vmO3AQDkV4oV2Ktvt4bA==", + "version": "5.10.15", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.10.15.tgz", + "integrity": "sha512-6AW4MLBUijJi31hxx+6utTJM2q/4hbO+QiMdtwM+f4Iy+BfFnh/elhb08apxNYLfuugPnXXpkDmzEjg+8uDU9g==", "dependencies": { - "@babel/runtime": "^7.19.0", + "@babel/runtime": "^7.20.1", "@types/prop-types": "^15.7.5", "@types/react-is": "^16.7.1 || ^17.0.0", "prop-types": "^15.8.1", @@ -5490,9 +5490,9 @@ } }, "node_modules/axios": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.1.3.tgz", - "integrity": "sha512-00tXVRwKx/FZr/IDVFt4C+f9FYairX517WoGCL6dpOntqLkZofjhu43F/Xl44UOpqa+9sLFDrG/XAnFsUYgkDA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.2.0.tgz", + "integrity": "sha512-zT7wZyNYu3N5Bu0wuZ6QccIf93Qk1eV8LOewxgjOZFd2DenOs98cJ7+Y6703d0wkaXGY6/nZd4EweJaHz9uzQw==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -15205,9 +15205,9 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, "node_modules/regenerator-transform": { "version": "0.15.0", @@ -19105,11 +19105,11 @@ } }, "@babel/runtime": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.19.0.tgz", - "integrity": "sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA==", + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.1.tgz", + "integrity": "sha512-mrzLkl6U9YLF8qpqI7TB82PESyEGjm/0Ly91jG575eVxMMlb8fYfOXFZIJ8XfLrJZQbm7dlKry2bJmXBUEkdFg==", "requires": { - "regenerator-runtime": "^0.13.4" + "regenerator-runtime": "^0.13.10" } }, "@babel/runtime-corejs3": { @@ -20102,14 +20102,14 @@ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==" }, "@mui/base": { - "version": "5.0.0-alpha.105", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.105.tgz", - "integrity": "sha512-4IPBcJQIgVVXQvN6DQMoCHed52GBtwSqYs0jD0dDcMR3o76AodQtpEeWFz3p7mJoc6f/IHBl9U6jEfL1r/kM4g==", + "version": "5.0.0-alpha.107", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.107.tgz", + "integrity": "sha512-HX/BD8CSe+Y/dpbZ5aKJScJhKQ/Hw6du2yd68Upv2cO67bwixyZ64h3aNcdDu7RQzI7nrZQm0JykffP1Orgq0g==", "requires": { - "@babel/runtime": "^7.19.0", + "@babel/runtime": "^7.20.1", "@emotion/is-prop-valid": "^1.2.0", - "@mui/types": "^7.2.0", - "@mui/utils": "^5.10.9", + "@mui/types": "^7.2.1", + "@mui/utils": "^5.10.15", "@popperjs/core": "^2.11.6", "clsx": "^1.2.1", "prop-types": "^15.8.1", @@ -20124,21 +20124,21 @@ } }, "@mui/core-downloads-tracker": { - "version": "5.10.13", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.10.13.tgz", - "integrity": "sha512-zWkWPV/SaNdsIdxAWiuVGZ+Ue3BkfSIlU/BFIrJmuUcwiIa7gQsbI/DOpj1KzLvqZhdEe2wC1aG4nCHfzgc1Hg==" + "version": "5.10.15", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.10.15.tgz", + "integrity": "sha512-xFcS0LpdF0Q1qJrrNsYUv9PU+ovvhCEPTOMw2jcpEFtl3CA87dLpvztORR5oE2UBFjWF7qLQLOwboQU1+xC7Cw==" }, "@mui/material": { - "version": "5.10.13", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.10.13.tgz", - "integrity": "sha512-TkkT1rNc0/hhL4/+zv4gYcA6egNWBH/1Tz+azoTnQIUdZ32fgwFI2pFX2KVJNTt30xnLznxDWtTv7ilmJQ52xw==", - "requires": { - "@babel/runtime": "^7.19.0", - "@mui/base": "5.0.0-alpha.105", - "@mui/core-downloads-tracker": "^5.10.13", - "@mui/system": "^5.10.13", - "@mui/types": "^7.2.0", - "@mui/utils": "^5.10.9", + "version": "5.10.15", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.10.15.tgz", + "integrity": "sha512-OqoHfUtVMppFHgk2M95j+pR8MWfLKhzSdz4aKEfIpFrHIHbYang+oY7Iy/exX+vqpZSEGHgHQ0cGX0hGTGx9cg==", + "requires": { + "@babel/runtime": "^7.20.1", + "@mui/base": "5.0.0-alpha.107", + "@mui/core-downloads-tracker": "^5.10.15", + "@mui/system": "^5.10.15", + "@mui/types": "^7.2.1", + "@mui/utils": "^5.10.15", "@types/react-transition-group": "^4.4.5", "clsx": "^1.2.1", "csstype": "^3.1.1", @@ -20155,53 +20155,53 @@ } }, "@mui/private-theming": { - "version": "5.10.9", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.10.9.tgz", - "integrity": "sha512-BN7/CnsVPVyBaQpDTij4uV2xGYHHHhOgpdxeYLlIu+TqnsVM7wUeF+37kXvHovxM6xmL5qoaVUD98gDC0IZnHg==", + "version": "5.10.15", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.10.15.tgz", + "integrity": "sha512-l7CsUj5kYdYz118/JHSvZZTYE9WnIWwln0td5jYATnYw9cNX4ygD6AkKOUYZ1Jitp1YLJqcO8jCP9E5/Nql9IQ==", "requires": { - "@babel/runtime": "^7.19.0", - "@mui/utils": "^5.10.9", + "@babel/runtime": "^7.20.1", + "@mui/utils": "^5.10.15", "prop-types": "^15.8.1" } }, "@mui/styled-engine": { - "version": "5.10.8", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.10.8.tgz", - "integrity": "sha512-w+y8WI18EJV6zM/q41ug19cE70JTeO6sWFsQ7tgePQFpy6ToCVPh0YLrtqxUZXSoMStW5FMw0t9fHTFAqPbngw==", + "version": "5.10.14", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.10.14.tgz", + "integrity": "sha512-bgKdM57ExogWpIfhL/ngSlzF4FhbH00vYF+Y5VALTob4uslFqje0xzoWmbfcCn4cZt2NXxZJIwhsq4vzo5itlw==", "requires": { - "@babel/runtime": "^7.19.0", - "@emotion/cache": "^11.10.3", + "@babel/runtime": "^7.20.1", + "@emotion/cache": "^11.10.5", "csstype": "^3.1.1", "prop-types": "^15.8.1" } }, "@mui/system": { - "version": "5.10.13", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.10.13.tgz", - "integrity": "sha512-Xzx26Asu5fVlm0ucm+gnJmeX4Y1isrpVDvqxX4yJaOT7Fzmd8Lfq9ih3QMfZajns5LMtUiOuCQlVFRtUG5IY7A==", - "requires": { - "@babel/runtime": "^7.19.0", - "@mui/private-theming": "^5.10.9", - "@mui/styled-engine": "^5.10.8", - "@mui/types": "^7.2.0", - "@mui/utils": "^5.10.9", + "version": "5.10.15", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.10.15.tgz", + "integrity": "sha512-WZmgmpYTMXAaD++QetaaM/miwhNh1JJY1dH7MJH/3Fuv3r3gnhfzE6A55lDqWxkQmlWUO2DCn/cnNZ0FkSdZUg==", + "requires": { + "@babel/runtime": "^7.20.1", + "@mui/private-theming": "^5.10.15", + "@mui/styled-engine": "^5.10.14", + "@mui/types": "^7.2.1", + "@mui/utils": "^5.10.15", "clsx": "^1.2.1", "csstype": "^3.1.1", "prop-types": "^15.8.1" } }, "@mui/types": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.0.tgz", - "integrity": "sha512-lGXtFKe5lp3UxTBGqKI1l7G8sE2xBik8qCfrLHD5olwP/YU0/ReWoWT7Lp1//ri32dK39oPMrJN8TgbkCSbsNA==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.1.tgz", + "integrity": "sha512-c5mSM7ivD8EsqK6HUi9hQPr5V7TJ/IRThUQ9nWNYPdhCGriTSQV4vL6DflT99LkM+wLiIS1rVjphpEWxERep7A==", "requires": {} }, "@mui/utils": { - "version": "5.10.9", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.10.9.tgz", - "integrity": "sha512-2tdHWrq3+WCy+G6TIIaFx3cg7PorXZ71P375ExuX61od1NOAJP1mK90VxQ8N4aqnj2vmO3AQDkV4oV2Ktvt4bA==", + "version": "5.10.15", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.10.15.tgz", + "integrity": "sha512-6AW4MLBUijJi31hxx+6utTJM2q/4hbO+QiMdtwM+f4Iy+BfFnh/elhb08apxNYLfuugPnXXpkDmzEjg+8uDU9g==", "requires": { - "@babel/runtime": "^7.19.0", + "@babel/runtime": "^7.20.1", "@types/prop-types": "^15.7.5", "@types/react-is": "^16.7.1 || ^17.0.0", "prop-types": "^15.8.1", @@ -21711,9 +21711,9 @@ "integrity": "sha512-32+ub6kkdhhWick/UjvEwRchgoetXqTK14INLqbGm5U2TzBkBNF3nQtLYm8ovxSkQWArjEQvftCKryjZaATu3w==" }, "axios": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.1.3.tgz", - "integrity": "sha512-00tXVRwKx/FZr/IDVFt4C+f9FYairX517WoGCL6dpOntqLkZofjhu43F/Xl44UOpqa+9sLFDrG/XAnFsUYgkDA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.2.0.tgz", + "integrity": "sha512-zT7wZyNYu3N5Bu0wuZ6QccIf93Qk1eV8LOewxgjOZFd2DenOs98cJ7+Y6703d0wkaXGY6/nZd4EweJaHz9uzQw==", "requires": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -28595,9 +28595,9 @@ } }, "regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, "regenerator-transform": { "version": "0.15.0", diff --git a/package.json b/package.json index 0965eb6..10f2b72 100644 --- a/package.json +++ b/package.json @@ -10,12 +10,12 @@ "@fullcalendar/list": "^5.11.3", "@fullcalendar/react": "^5.11.2", "@fullcalendar/timegrid": "^5.11.3", - "@mui/material": "^5.10.13", + "@mui/material": "^5.10.15", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", "addeventlistener": "^2.0.0", - "axios": "^1.1.3", + "axios": "^1.2.0", "chart": "^0.1.2", "chart.js": "^3.9.1", "crypto-js": "^4.1.1", diff --git a/server-api/api.js b/server-api/api.js index e90b4fd..c95ec21 100644 --- a/server-api/api.js +++ b/server-api/api.js @@ -86,6 +86,20 @@ app.get('/User/Auth/:login/:pwd', (req, res) => { }); }); +app.get('/User/Auth/Password/:id/:pwd', (req, res) => { + + const id = req.params.id; + const pwd = req.params.pwd; + let sql = 'SELECT login FROM users WHERE iduser = ? AND password = ?'; + + db.query(sql, [id, pwd], (err, result) => { + if (err) throw err; + + console.log(result); + res.send(result); + }); +}); + app.get('/User/Role/:login', (req, res) => { const login = req.params.login; @@ -155,18 +169,45 @@ app.put('/User/Update/:id', (req, res) => { const id = req.params.id; let form = req.body; - const sql = `UPDATE users SET lastname = ?, firstname = ?, idrole = ?, login = ?, password = ?, phone = ?, mail = ? WHERE (iduser = ?)`; - db.query(sql, [form.lastname, form.firstname, form.idrole, form.login, form.password, form.phone, form.mail, id], (err, result) => { + const sql = `UPDATE users SET lastname = ?, firstname = ?, idrole = ?, login = ?, phone = ?, mail = ? WHERE (iduser = ?)`; + db.query(sql, [form.lastname, form.firstname, form.idrole, form.login, form.phone, form.mail, id], (err, result) => { + if (err) throw err; + console.log(result); + res.send('Post update...'); + }); +}); + +app.put('/User/Update/Password/:id', (req, res) => { + + const id = req.params.id; + let form = req.body; + + console.log(form.newPassword); + + const sql = `UPDATE users SET password = ? WHERE (iduser = ?)`; + db.query(sql, [form.newPassword, id], (err, result) => { + if (err) throw err; + console.log(result); + res.send('Post password update...'); + }); +}); + +app.delete('/User/Delete/:id', (req, res) => { + + const id = req.params.id; + + const sql = `DELETE FROM users WHERE (iduser = ?)`; + db.query(sql, [id], (err, result) => { if (err) throw err; console.log(result); - res.send('Post added...'); + res.send('Post delete...'); }); }); //Api pour les contacts de la page repertoire -app.get('/Contact/All', (req, res) => { - let sql = 'SELECT * FROM contacts ORDER BY idcontact'; +app.get('/Contact/AllWithCustomerName', (req, res) => { + let sql = 'SELECT c.*, cu.name FROM contacts c, customers cu WHERE cu.idCustomer = c.idCustomer ORDER BY idcontact'; db.query(sql, (err, result) => { if (err) throw err; console.log(result); diff --git a/src/App.js b/src/App.js index 1b97d3b..94bb84f 100644 --- a/src/App.js +++ b/src/App.js @@ -4,6 +4,7 @@ import Compte from './pages/Compte'; import Connexion from './pages/Connexion'; import Admin_modif from './pages/Admin_modif'; import Admin_supp from './pages/Admin_supp'; +import Admin_devis from './pages/Admin_devis'; import Dashboard from './pages/Dashboard'; import Analyse from './pages/Analyse'; import Admin_list from './pages/Admin_list'; @@ -13,6 +14,8 @@ import Repertoire from './pages/Repertoire'; import Parametres from './pages/Parametres'; import Chargement from './pages/Chargement'; import { Component } from 'fullcalendar'; +import RestartPassword from './pages/RestartPassword'; + diff --git a/src/components/NavigationAdmin.js b/src/components/NavigationAdmin.js index d1fc0d4..19db335 100644 --- a/src/components/NavigationAdmin.js +++ b/src/components/NavigationAdmin.js @@ -6,24 +6,25 @@ const NavigationAdmin = (props) => { return (
Admin
Création d'utilisateur
diff --git a/src/pages/Admin_devis.js b/src/pages/Admin_devis.js new file mode 100644 index 0000000..0e5c7f1 --- /dev/null +++ b/src/pages/Admin_devis.js @@ -0,0 +1,24 @@ +import React, { useState, useEffect } from 'react'; +import axios from 'axios' +import NavigationAdmin from '../components/NavigationAdmin.js'; +import { TableContainer,Table,TableHead,TableBody,TableRow,TableCell } from '@mui/material'; +import { Paper } from '@mui/material'; + +const api = axios.create({ + baseURL: 'http://localhost:8080' + }) + +const Admin_devis = () => { + + return ( +Devis
+Admin
@@ -39,28 +44,6 @@ function Admin_list() {Admin
Supression d'utilisateur
Nom Complet :
+{}
Mateo Centeno
Repertoire
-Liste des utilisateurs
-Admin
+Modification d'utilisateur
+