From aac1b22e91c42f2af643e10d18d07cb5d8fc8c3c Mon Sep 17 00:00:00 2001 From: Maxence Lanone Date: Sun, 27 Nov 2022 09:57:32 +0100 Subject: [PATCH 01/30] ajout fonction ajouter repertoire (pas fini) --- .scannerwork/.sonar_lock | 0 .scannerwork/report-task.txt | 6 ++++++ src/pages/Repertoire.js | 6 +++++- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .scannerwork/.sonar_lock create mode 100644 .scannerwork/report-task.txt diff --git a/.scannerwork/.sonar_lock b/.scannerwork/.sonar_lock new file mode 100644 index 0000000..e69de29 diff --git a/.scannerwork/report-task.txt b/.scannerwork/report-task.txt new file mode 100644 index 0000000..1953886 --- /dev/null +++ b/.scannerwork/report-task.txt @@ -0,0 +1,6 @@ +projectKey=jtt_crm +serverUrl=https://codefirst.iut.uca.fr/sonar +serverVersion=9.6.1.59531 +dashboardUrl=https://codefirst.iut.uca.fr/sonar/dashboard?id=jtt_crm +ceTaskId=AYSvDEjizKKB0GF_0uUi +ceTaskUrl=https://codefirst.iut.uca.fr/sonar/api/ce/task?id=AYSvDEjizKKB0GF_0uUi diff --git a/src/pages/Repertoire.js b/src/pages/Repertoire.js index c32adf3..2c75f50 100644 --- a/src/pages/Repertoire.js +++ b/src/pages/Repertoire.js @@ -62,7 +62,7 @@ function Repertoire() { - + @@ -119,6 +119,10 @@ function Repertoire() { ); }; +function ajouter() { + console.log("ajouter"); +}; + // function Repertoire() { // // NOW WITH THE USE OF HOOKS WE WILL GET THE CONTACTS From 49275fbe90c852a1b35156d7a87218916462456b Mon Sep 17 00:00:00 2001 From: Maxence Lanone Date: Sun, 27 Nov 2022 15:10:20 +0100 Subject: [PATCH 02/30] =?UTF-8?q?mise=20en=20forme=20du=20fomulaire=20avec?= =?UTF-8?q?=20donn=C3=A9es=20bdd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server-api/api.js | 38 +++++- src/App.js | 2 + src/components/Contact/AddContact.js | 109 +++++++++++++----- src/pages/Repertoire.js | 49 +++++++- src/styles/components/_repertoire.scss | 1 + .../components/contact/_addContact.scss | 8 ++ src/styles/index.scss | 3 +- 7 files changed, 174 insertions(+), 36 deletions(-) create mode 100644 src/styles/components/contact/_addContact.scss diff --git a/server-api/api.js b/server-api/api.js index c95ec21..8117453 100644 --- a/server-api/api.js +++ b/server-api/api.js @@ -213,4 +213,40 @@ app.get('/Contact/AllWithCustomerName', (req, res) => { console.log(result); res.send(result); }); -}); \ No newline at end of file +}); + +app.get('/Entreprise/All', (req, res) => { + let sql = 'SELECT * FROM customers ORDER BY name'; + db.query(sql, (err, result) => { + if (err) throw err; + console.log(result); + res.send(result); + }); +}); + +app.get('/Contact/Exist/:login', (req, res) => { + + const login = req.params.login; + let sql = 'SELECT idContact FROM contact WHERE login = ?'; + + db.query(sql, [login], (err, result) => { + if (err) throw err; + + console.log(result); + res.send(result); + }); +}); + +app.post('/Contact/Add', (req, res) => { + + let form = req.body; + + console.log(form); + + const sql = `INSERT INTO contact(name, firstname, mail, phone, idUser, idCustomer) VALUES ('${form.name}', '${form.firstname}', '${form.mail}', '${form.phone}' , '${form.idrole}', '${form.idUser}', '${form.idCustomer}' )`; + db.query(sql , (err, result) => { + if (err) throw err; + console.log(result); + res.send('Post added...' + result.insertId); + }); +}); diff --git a/src/App.js b/src/App.js index f2910b2..552dbb7 100644 --- a/src/App.js +++ b/src/App.js @@ -13,6 +13,7 @@ import Calendrier from './pages/Calendrier'; import Repertoire from './pages/Repertoire'; import Parametres from './pages/Parametres'; import Chargement from './pages/Chargement'; +import AddContact from './components/Contact/AddContact' import { Component } from 'fullcalendar'; import RestartPassword from './pages/RestartPassword'; @@ -38,6 +39,7 @@ const App = () => { } /> } /> } /> + } /> ); diff --git a/src/components/Contact/AddContact.js b/src/components/Contact/AddContact.js index c9c0c60..26a6e71 100644 --- a/src/components/Contact/AddContact.js +++ b/src/components/Contact/AddContact.js @@ -1,40 +1,93 @@ -import React, {useState} from 'react' -import {useNavigate} from 'react-router-dom'; +import React, { useState, useEffect } from 'react'; +import axios from 'axios' +import NavigationDashboard from '../NavigationDashboard.js'; +import CryptoJS from 'crypto-js'; +import Select, { SelectChangeEvent } from '@mui/material/Select'; +import MenuItem from '@mui/material/MenuItem'; +import { NavLink } from 'react-router-dom'; +import { useNavigate } from "react-router-dom"; +import { Button } from '@mui/material'; // HERE ABOVE useHistory IS REPLACED WITH useNavigate +const api = axios.create({ + baseURL: 'http://localhost:8080' + }) + function AddContact(props) { + + const [loginError, setLoginError] = useState(false); + const [entreprises, setEntreprises] = useState([]); + const [selectedIdEntreprise, setSelectedIdEntreprise] = useState(1); const navigate=useNavigate(); - const [User, setUser] = useState({name:"", email:""}); - let add = (e) => { - e.preventDefault(); - if(User.name === "" || User.email === ""){ - alert("All fields are mandatory!!!"); - return - } - // THIS IS USED TO SHOW THE LIST DATA ON THE APP.JS FILE - props.addContactHandler(User); - // THIS IS USED FOR WHEN THE ADD BUTTON IS PRESSED THE INPUT FILED AGAIN GETS EMPTY - setUser({name:"", email:""}); - //console.log(props); - navigate('/'); - } + useEffect(() =>{ + api.get('/Entreprise/All').then((response) => { + setEntreprises(response.data); + }); + }, []); + + function handleChangeEntreprise(event){ + setSelectedIdEntreprise(event.target.value); + }; + + function checkAdd(event){ + + event.preventDefault(); + + const formData = new FormData(event.currentTarget); + const values = Object.fromEntries(formData.entries()); + console.log(values.name); + api.get('/Contact/Exist/'+ values.login).then((response) => { + const login = response.data; + if (login.length > 0){ + setLoginError(true); + } + else { + setLoginError(false); + + api.post('/Contact/Add', values).then (function(response) { + console.log(response.data); + }); + + navigate("/Repertoire"); + } + }); + }; return ( -
-

Add Contact

-
-
- - setUser({...User, name: e.target.value})}/> -
-
- - setUser({...User, email: e.target.value})}/> +
+

Ajouter un nouveau contact

+
+ +
+ +
+

Nom :

+

Prénom :

+

Téléphone :

+

Email :

+

Entreprise :

+
+ + + + + + + + +
+

{loginError === true?"L'identifiant existe déja":''}

+
+ + Retour +
+ - - ) } diff --git a/src/pages/Repertoire.js b/src/pages/Repertoire.js index 2c75f50..e52d96d 100644 --- a/src/pages/Repertoire.js +++ b/src/pages/Repertoire.js @@ -4,7 +4,8 @@ import axios from 'axios'; import user from '../images/user.jpg'; import { TableContainer, Table, TableHead, TableBody, TableRow, TableCell } from '@mui/material'; import { Paper } from '@mui/material'; - +import { NavLink } from 'react-router-dom'; +import { useNavigate } from 'react-router-dom'; const api = axios.create({ baseURL: 'http://localhost:8080' @@ -12,7 +13,7 @@ const api = axios.create({ function Repertoire() { - const [theme, setTheme] = useState("light"); + const [theme, setTheme] = useState("light"); if (localStorage.getItem('theme') && localStorage.getItem("theme") !== '' && localStorage.getItem("theme") !== theme) { setTheme(localStorage.getItem("theme")) } @@ -21,7 +22,7 @@ function Repertoire() { const [SearchTerm, setSearchTerm] = useState(""); const [SearchResults, setSearchResults] = useState([]); const [customers, setCustomers] = useState([]); - + useEffect(() => { api.get('/Contact/AllWithCustomerName').then((response) => { @@ -62,7 +63,9 @@ function Repertoire() { - + + + @@ -119,10 +122,44 @@ function Repertoire() { ); }; -function ajouter() { - console.log("ajouter"); +function AddContact(props) { + + const navigate = useNavigate(); + const [User, setUser] = useState({ name: "", email: "" }); + + let add = (e) => { + e.preventDefault(); + if (User.name === "" || User.email === "") { + alert("All fields are mandatory!!!"); + return + } + // THIS IS USED TO SHOW THE LIST DATA ON THE APP.JS FILE + props.addContactHandler(User); + // THIS IS USED FOR WHEN THE ADD BUTTON IS PRESSED THE INPUT FILED AGAIN GETS EMPTY + setUser({ name: "", email: "" }); + //console.log(props); + navigate('/'); + } + return ( +
+

Add Contact

+
+
+ + setUser({ ...User, name: e.target.value })} /> +
+
+ + setUser({ ...User, email: e.target.value })} /> +
+ + +
+ ); }; + + // function Repertoire() { // // NOW WITH THE USE OF HOOKS WE WILL GET THE CONTACTS diff --git a/src/styles/components/_repertoire.scss b/src/styles/components/_repertoire.scss index 7ed5f78..452f105 100644 --- a/src/styles/components/_repertoire.scss +++ b/src/styles/components/_repertoire.scss @@ -177,6 +177,7 @@ body { margin: 30px 30px; border-radius: 25px; box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); + text-decoration-line: none; } .input_box { diff --git a/src/styles/components/contact/_addContact.scss b/src/styles/components/contact/_addContact.scss new file mode 100644 index 0000000..b79b38c --- /dev/null +++ b/src/styles/components/contact/_addContact.scss @@ -0,0 +1,8 @@ +.addContactPage{ + display: flex; + flex-direction: column; + justify-content: space-around; + align-items: center; + + +} \ No newline at end of file diff --git a/src/styles/index.scss b/src/styles/index.scss index ac6a812..eb40ba3 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -7,4 +7,5 @@ @import "./components/calendrier"; @import "./components/parametre"; @import "./components/repertoire"; -@import "./components/chargement" \ No newline at end of file +@import "./components/chargement"; +@import "./components/contact/addContact"; \ No newline at end of file From 5544622afeede317130a61797f40d8bc4f58f464 Mon Sep 17 00:00:00 2001 From: clverdoire Date: Tue, 6 Dec 2022 14:33:08 +0100 Subject: [PATCH 03/30] Bug bouton page parametre --- package-lock.json | 449 +++++++++++++------------- package.json | 2 +- src/pages/Parametres.js | 6 +- src/styles/components/_parametre.scss | 1 + 4 files changed, 230 insertions(+), 228 deletions(-) diff --git a/package-lock.json b/package-lock.json index 792ca09..25473ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", "addeventlistener": "^2.0.0", - "axios": "^1.2.0", + "axios": "^1.2.1", "chart": "^0.1.2", "chart.js": "^4.0.1", "crypto-js": "^4.1.1", @@ -3813,9 +3813,9 @@ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==" }, "node_modules/@mui/base": { - "version": "5.0.0-alpha.108", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.108.tgz", - "integrity": "sha512-KjzRUts2i/ODlMfywhFTqTzQl+Cr9nlDSZxJcnYjrbOV/iRyQNBTDoiFJt+XEdRi0fZBHnk74AFbnP56ehybsA==", + "version": "5.0.0-alpha.109", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.109.tgz", + "integrity": "sha512-UQxoONPI3ntzxcD/cbFHl+Lp2xsVj6HpKmU9QhUZ2kZ2K2yej2QJyU1gnADoWl/Hu94VrvwSSRnjTjR3HvXO/g==", "dependencies": { "@babel/runtime": "^7.20.1", "@emotion/is-prop-valid": "^1.2.0", @@ -3845,23 +3845,23 @@ } }, "node_modules/@mui/core-downloads-tracker": { - "version": "5.10.16", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.10.16.tgz", - "integrity": "sha512-eK9+olw2ZbXX+vGrtKnN01/vLP1aX0Lq0xok35bqWM1aB93Dcmky/xPNf8h31oJ/C+IzJBjZaZMEDzVZg4Qc0A==", + "version": "5.10.17", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.10.17.tgz", + "integrity": "sha512-iNwUuMA30nrN0tiEkeD3zaczv7Tk2jlZIDbXRnijAsYXkZtl/xEzQsVRIPYRDuyEz6D18vQJhV8h7gPUXEubTg==", "funding": { "type": "opencollective", "url": "https://opencollective.com/mui" } }, "node_modules/@mui/material": { - "version": "5.10.16", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.10.16.tgz", - "integrity": "sha512-JSHcDQQ+k30NKkCM/0KX6jq4F5LOrbFKZpS+cEl7scZWOCJpUPH5ccAT5a7O8wzrgNZ8Y9PnwzNvWBrfShpJFw==", + "version": "5.10.17", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.10.17.tgz", + "integrity": "sha512-Kuqgv1qI5HXnc/Xu426xhCGYBSKzplb+xFNLitbnIb92Qx8jmcpfNpFlDJa2kD2H6qP66rr/m4c/zMUfGX/xBQ==", "dependencies": { "@babel/runtime": "^7.20.1", - "@mui/base": "5.0.0-alpha.108", - "@mui/core-downloads-tracker": "^5.10.16", - "@mui/system": "^5.10.16", + "@mui/base": "5.0.0-alpha.109", + "@mui/core-downloads-tracker": "^5.10.17", + "@mui/system": "^5.10.17", "@mui/types": "^7.2.2", "@mui/utils": "^5.10.16", "@types/react-transition-group": "^4.4.5", @@ -3955,9 +3955,9 @@ } }, "node_modules/@mui/system": { - "version": "5.10.16", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.10.16.tgz", - "integrity": "sha512-OqI9B1jZ9zQ/dmoqseku4CzdEs9DbLiiMOaWxC3WeAJxM1UavlCgXz0encqm93LIlmSL7TjuHN1/rW8BJCnU8A==", + "version": "5.10.17", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.10.17.tgz", + "integrity": "sha512-UYzAOSK7uxkMsUssqrIUW3lnOuQpU8vqh4hLwfSw+GYAnQo3qjK4m4NhlDx+pFpsjjiGnr3K+vrSH+aIAMbcLg==", "dependencies": { "@babel/runtime": "^7.20.1", "@mui/private-theming": "^5.10.16", @@ -4155,9 +4155,9 @@ } }, "node_modules/@remix-run/router": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.3.tgz", - "integrity": "sha512-ceuyTSs7PZ/tQqi19YZNBc5X7kj1f8p+4DIyrcIYFY9h+hd1OKm4RqtiWldR9eGEvIiJfsqwM4BsuCtRIuEw6Q==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.4.tgz", + "integrity": "sha512-gTL8H5USTAKOyVA4xczzDJnC3HMssdFa3tRlwBicXynx9XfiXwneHnYQogwSKpdCkjXISrEKSTtX62rLpNEVQg==", "engines": { "node": ">=14" } @@ -4866,9 +4866,9 @@ } }, "node_modules/@types/jest": { - "version": "29.2.3", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.2.3.tgz", - "integrity": "sha512-6XwoEbmatfyoCjWRX7z0fKMmgYKe9+/HrviJ5k0X/tjJWHGAezZOfYaxqQKuzG/TvQyr+ktjm4jgbk0s4/oF2w==", + "version": "29.2.4", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.2.4.tgz", + "integrity": "sha512-PipFB04k2qTRPePduVLTRiPzQfvMeLwUN3Z21hsAKaB/W9IIzgB2pizCL466ftJlcyZqnHoC9ZHpxLGl3fS86A==", "dependencies": { "expect": "^29.0.0", "pretty-format": "^29.0.0" @@ -4914,9 +4914,9 @@ "integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==" }, "node_modules/@types/node": { - "version": "18.11.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", - "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==" + "version": "18.11.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.11.tgz", + "integrity": "sha512-KJ021B1nlQUBLopzZmPBVuGU9un7WJd/W4ya7Ih02B4Uwky5Nja0yGYav2EfYIk0RR2Q9oVhf60S2XR1BCWJ2g==" }, "node_modules/@types/parse-json": { "version": "4.0.0", @@ -4949,9 +4949,9 @@ "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==" }, "node_modules/@types/react": { - "version": "18.0.25", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.25.tgz", - "integrity": "sha512-xD6c0KDT4m7n9uD4ZHi02lzskaiqcBxf4zi+tXZY98a04wvc0hi/TcCPC2FOESZi51Nd7tlUeOJY8RofL799/g==", + "version": "18.0.26", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.26.tgz", + "integrity": "sha512-hCR3PJQsAIXyxhTNSiDFY//LhnMZWpNNr5etoCqx/iUfGc5gXWtQR2Phl908jVR6uPXacojQWTg4qRpkxTuGug==", "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -5062,9 +5062,9 @@ } }, "node_modules/@types/yargs": { - "version": "17.0.15", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.15.tgz", - "integrity": "sha512-ZHc4W2dnEQPfhn06TBEdWaiUHEZAocYaiVMfwOipY5jcJt/251wVrKCBWBetGZWO5CF8tdb7L3DmdxVlZ2BOIg==", + "version": "17.0.16", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.16.tgz", + "integrity": "sha512-Mh3OP0oh8X7O7F9m5AplC+XHYLBWuPKNkGVD3gIZFLFebBnuFI2Nz5Sf8WLvwGxECJ8YjifQvFdh79ubODkdug==", "dependencies": { "@types/yargs-parser": "*" } @@ -5075,13 +5075,13 @@ "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.45.0.tgz", - "integrity": "sha512-CXXHNlf0oL+Yg021cxgOdMHNTXD17rHkq7iW6RFHoybdFgQBjU3yIXhhcPpGwr1CjZlo6ET8C6tzX5juQoXeGA==", + "version": "5.45.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.45.1.tgz", + "integrity": "sha512-cOizjPlKEh0bXdFrBLTrI/J6B/QMlhwE9auOov53tgB+qMukH6/h8YAK/qw+QJGct/PTbdh2lytGyipxCcEtAw==", "dependencies": { - "@typescript-eslint/scope-manager": "5.45.0", - "@typescript-eslint/type-utils": "5.45.0", - "@typescript-eslint/utils": "5.45.0", + "@typescript-eslint/scope-manager": "5.45.1", + "@typescript-eslint/type-utils": "5.45.1", + "@typescript-eslint/utils": "5.45.1", "debug": "^4.3.4", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", @@ -5121,11 +5121,11 @@ } }, "node_modules/@typescript-eslint/experimental-utils": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.45.0.tgz", - "integrity": "sha512-DnRQg5+3uHHt/gaifTjwg9OKbg9/TWehfJzYHQIDJboPEbF897BKDE/qoqMhW7nf0jWRV1mwVXTaUvtB1/9Gwg==", + "version": "5.45.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.45.1.tgz", + "integrity": "sha512-WlXwY9dbmc0Lzu6xQOZ3yN8u/ws/1R8zPC16O217LMZJCbV2hJezqkWMUB+jMwguOJW+cukCDe92vcwwf8zwjQ==", "dependencies": { - "@typescript-eslint/utils": "5.45.0" + "@typescript-eslint/utils": "5.45.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -5139,13 +5139,13 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.45.0.tgz", - "integrity": "sha512-brvs/WSM4fKUmF5Ot/gEve6qYiCMjm6w4HkHPfS6ZNmxTS0m0iNN4yOChImaCkqc1hRwFGqUyanMXuGal6oyyQ==", + "version": "5.45.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.45.1.tgz", + "integrity": "sha512-JQ3Ep8bEOXu16q0ztsatp/iQfDCtvap7sp/DKo7DWltUquj5AfCOpX2zSzJ8YkAVnrQNqQ5R62PBz2UtrfmCkA==", "dependencies": { - "@typescript-eslint/scope-manager": "5.45.0", - "@typescript-eslint/types": "5.45.0", - "@typescript-eslint/typescript-estree": "5.45.0", + "@typescript-eslint/scope-manager": "5.45.1", + "@typescript-eslint/types": "5.45.1", + "@typescript-eslint/typescript-estree": "5.45.1", "debug": "^4.3.4" }, "engines": { @@ -5165,12 +5165,12 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.45.0.tgz", - "integrity": "sha512-noDMjr87Arp/PuVrtvN3dXiJstQR1+XlQ4R1EvzG+NMgXi8CuMCXpb8JqNtFHKceVSQ985BZhfRdowJzbv4yKw==", + "version": "5.45.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.45.1.tgz", + "integrity": "sha512-D6fCileR6Iai7E35Eb4Kp+k0iW7F1wxXYrOhX/3dywsOJpJAQ20Fwgcf+P/TDtvQ7zcsWsrJaglaQWDhOMsspQ==", "dependencies": { - "@typescript-eslint/types": "5.45.0", - "@typescript-eslint/visitor-keys": "5.45.0" + "@typescript-eslint/types": "5.45.1", + "@typescript-eslint/visitor-keys": "5.45.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -5181,12 +5181,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.45.0.tgz", - "integrity": "sha512-DY7BXVFSIGRGFZ574hTEyLPRiQIvI/9oGcN8t1A7f6zIs6ftbrU0nhyV26ZW//6f85avkwrLag424n+fkuoJ1Q==", + "version": "5.45.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.45.1.tgz", + "integrity": "sha512-aosxFa+0CoYgYEl3aptLe1svP910DJq68nwEJzyQcrtRhC4BN0tJAvZGAe+D0tzjJmFXe+h4leSsiZhwBa2vrA==", "dependencies": { - "@typescript-eslint/typescript-estree": "5.45.0", - "@typescript-eslint/utils": "5.45.0", + "@typescript-eslint/typescript-estree": "5.45.1", + "@typescript-eslint/utils": "5.45.1", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -5207,9 +5207,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.45.0.tgz", - "integrity": "sha512-QQij+u/vgskA66azc9dCmx+rev79PzX8uDHpsqSjEFtfF2gBUTRCpvYMh2gw2ghkJabNkPlSUCimsyBEQZd1DA==", + "version": "5.45.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.45.1.tgz", + "integrity": "sha512-HEW3U0E5dLjUT+nk7b4lLbOherS1U4ap+b9pfu2oGsW3oPu7genRaY9dDv3nMczC1rbnRY2W/D7SN05wYoGImg==", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -5219,12 +5219,12 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.45.0.tgz", - "integrity": "sha512-maRhLGSzqUpFcZgXxg1qc/+H0bT36lHK4APhp0AEUVrpSwXiRAomm/JGjSG+kNUio5kAa3uekCYu/47cnGn5EQ==", + "version": "5.45.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.45.1.tgz", + "integrity": "sha512-76NZpmpCzWVrrb0XmYEpbwOz/FENBi+5W7ipVXAsG3OoFrQKJMiaqsBMbvGRyLtPotGqUfcY7Ur8j0dksDJDng==", "dependencies": { - "@typescript-eslint/types": "5.45.0", - "@typescript-eslint/visitor-keys": "5.45.0", + "@typescript-eslint/types": "5.45.1", + "@typescript-eslint/visitor-keys": "5.45.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -5259,15 +5259,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.45.0.tgz", - "integrity": "sha512-OUg2JvsVI1oIee/SwiejTot2OxwU8a7UfTFMOdlhD2y+Hl6memUSL4s98bpUTo8EpVEr0lmwlU7JSu/p2QpSvA==", + "version": "5.45.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.45.1.tgz", + "integrity": "sha512-rlbC5VZz68+yjAzQBc4I7KDYVzWG2X/OrqoZrMahYq3u8FFtmQYc+9rovo/7wlJH5kugJ+jQXV5pJMnofGmPRw==", "dependencies": { "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.45.0", - "@typescript-eslint/types": "5.45.0", - "@typescript-eslint/typescript-estree": "5.45.0", + "@typescript-eslint/scope-manager": "5.45.1", + "@typescript-eslint/types": "5.45.1", + "@typescript-eslint/typescript-estree": "5.45.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0", "semver": "^7.3.7" @@ -5318,11 +5318,11 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.45.0.tgz", - "integrity": "sha512-jc6Eccbn2RtQPr1s7th6jJWQHBHI6GBVQkCHoJFQ5UreaKm59Vxw+ynQUPPY2u2Amquc+7tmEoC2G52ApsGNNg==", + "version": "5.45.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.45.1.tgz", + "integrity": "sha512-cy9ln+6rmthYWjH9fmx+5FU/JDpjQb586++x2FZlveq7GdGuLLW9a2Jcst2TGekH82bXpfmRNSwP9tyEs6RjvQ==", "dependencies": { - "@typescript-eslint/types": "5.45.0", + "@typescript-eslint/types": "5.45.1", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -5925,9 +5925,9 @@ } }, "node_modules/axios": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.2.0.tgz", - "integrity": "sha512-zT7wZyNYu3N5Bu0wuZ6QccIf93Qk1eV8LOewxgjOZFd2DenOs98cJ7+Y6703d0wkaXGY6/nZd4EweJaHz9uzQw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.2.1.tgz", + "integrity": "sha512-I88cFiGu9ryt/tfVEi4kX2SITsvDddTajXTOFmt2uK1ZVA8LytjtdeyefdQWEf5PU8w+4SSJDoYnggflB5tW4A==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -6502,9 +6502,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001434", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001434.tgz", - "integrity": "sha512-aOBHrLmTQw//WFa2rcF1If9fa3ypkC1wzqqiKHgfdrXTWcU8C4gKVZT77eQAPWN1APys3+uQ0Df07rKauXGEYA==", + "version": "1.0.30001436", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001436.tgz", + "integrity": "sha512-ZmWkKsnC2ifEPoWUvSAIGyOYwT+keAaaWPHiQ9DfMqS1t6tfuyFYoWR78TeZtznkEQ64+vGXH9cZrElwR2Mrxg==", "funding": [ { "type": "opencollective", @@ -7437,9 +7437,9 @@ } }, "node_modules/decimal.js": { - "version": "10.4.2", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.2.tgz", - "integrity": "sha512-ic1yEvwT6GuvaYwBLLY6/aFFgjZdySKTE8en/fkU3QICTmRtgtSlFn0u0BXN06InZwtfCelR7j8LRiDI/02iGA==" + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" }, "node_modules/dedent": { "version": "0.7.0", @@ -8075,9 +8075,9 @@ } }, "node_modules/eslint": { - "version": "8.28.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.28.0.tgz", - "integrity": "sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.29.0.tgz", + "integrity": "sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg==", "dependencies": { "@eslint/eslintrc": "^1.3.3", "@humanwhocodes/config-array": "^0.11.6", @@ -8906,9 +8906,9 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" }, "node_modules/fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.14.0.tgz", + "integrity": "sha512-eR2D+V9/ExcbF9ls441yIuN6TI2ED1Y2ZcA5BmMtJsOkWOFRJQ0Jt0g1UwqXJJVAb+V+umH5Dfr8oh4EVP7VVg==", "dependencies": { "reusify": "^1.0.4" } @@ -14094,11 +14094,11 @@ "integrity": "sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==" }, "node_modules/language-tags": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.5.tgz", - "integrity": "sha512-qJhlO9cGXi6hBGKoxEG/sKZDAHD5Hnu9Hs4WbOY3pCWXDhw0N8x1NenNzm2EnNLkLkk7J2SdxAkDSbb6ftT+UQ==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.6.tgz", + "integrity": "sha512-HNkaCgM8wZgE/BZACeotAAgpL9FUjEnhgF0FVQMIgH//zqTPreLYMb3rWYkYAqPoF75Jwuycp1da7uz66cfFQg==", "dependencies": { - "language-subtag-registry": "~0.3.2" + "language-subtag-registry": "^0.3.20" } }, "node_modules/leven": { @@ -14394,9 +14394,9 @@ } }, "node_modules/mini-css-extract-plugin": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.1.tgz", - "integrity": "sha512-viOoaUFy+Z2w43VsGPbtfwFrr0tKwDctK9dUofG5MBViYhD1noGFUzzDIVw0KPwCGUP+c7zqLxm+acuQs7zLzw==", + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.2.tgz", + "integrity": "sha512-EdlUizq13o0Pd+uCp+WO/JpkLvHRVGt97RqfeGhXqAcorYo1ypJSpkV+WDT0vY/kmh/p7wRdJNJtuyK540PXDw==", "dependencies": { "schema-utils": "^4.0.0" }, @@ -15454,9 +15454,9 @@ } }, "node_modules/postcss-custom-properties": { - "version": "12.1.10", - "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-12.1.10.tgz", - "integrity": "sha512-U3BHdgrYhCrwTVcByFHs9EOBoqcKq4Lf3kXwbTi4hhq0qWhl/pDWq2THbv/ICX/Fl9KqeHBb8OVrTf2OaYF07A==", + "version": "12.1.11", + "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-12.1.11.tgz", + "integrity": "sha512-0IDJYhgU8xDv1KY6+VgUwuQkVtmYzRwu+dMjnmdMafXYv86SWqfxkc7qdDvWS38vsjaEtv8e0vGOUQrAiMBLpQ==", "dependencies": { "postcss-value-parser": "^4.2.0" }, @@ -17023,11 +17023,11 @@ } }, "node_modules/react-router": { - "version": "6.4.3", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.4.3.tgz", - "integrity": "sha512-BT6DoGn6aV1FVP5yfODMOiieakp3z46P1Fk0RNzJMACzE7C339sFuHebfvWtnB4pzBvXXkHP2vscJzWRuUjTtA==", + "version": "6.4.4", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.4.4.tgz", + "integrity": "sha512-SA6tSrUCRfuLWeYsTJDuriRqfFIsrSvuH7SqAJHegx9ZgxadE119rU8oOX/rG5FYEthpdEaEljdjDlnBxvfr+Q==", "dependencies": { - "@remix-run/router": "1.0.3" + "@remix-run/router": "1.0.4" }, "engines": { "node": ">=14" @@ -17037,12 +17037,12 @@ } }, "node_modules/react-router-dom": { - "version": "6.4.3", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.4.3.tgz", - "integrity": "sha512-MiaYQU8CwVCaOfJdYvt84KQNjT78VF0TJrA17SIQgNHRvLnXDJO6qsFqq8F/zzB1BWZjCFIrQpu4QxcshitziQ==", + "version": "6.4.4", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.4.4.tgz", + "integrity": "sha512-0Axverhw5d+4SBhLqLpzPhNkmv7gahUwlUVIOrRLGJ4/uwt30JVajVJXqv2Qr/LCwyvHhQc7YyK1Do8a9Jj7qA==", "dependencies": { - "@remix-run/router": "1.0.3", - "react-router": "6.4.3" + "@remix-run/router": "1.0.4", + "react-router": "6.4.4" }, "engines": { "node": ">=14" @@ -18027,7 +18027,8 @@ "node_modules/sourcemap-codec": { "version": "1.4.8", "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "deprecated": "Please use @jridgewell/sourcemap-codec instead" }, "node_modules/spdy": { "version": "4.0.2", @@ -18559,9 +18560,9 @@ } }, "node_modules/terser": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.0.tgz", - "integrity": "sha512-KjTV81QKStSfwbNiwlBXfcgMcOloyuRdb62/iLFPGBcVNF4EXjhdYBhYHmbJpiBrVxZhDvltE11j+LBQUxEEJg==", + "version": "5.16.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.1.tgz", + "integrity": "sha512-xvQfyfA1ayT0qdK47zskQgRZeWLoOQ8JQ6mIgRGVNwZKdQMU+5FkCBjmv4QjcrTzyZquRw2FVtlJSRUmMKQslw==", "dependencies": { "@jridgewell/source-map": "^0.3.2", "acorn": "^8.5.0", @@ -22685,9 +22686,9 @@ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==" }, "@mui/base": { - "version": "5.0.0-alpha.108", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.108.tgz", - "integrity": "sha512-KjzRUts2i/ODlMfywhFTqTzQl+Cr9nlDSZxJcnYjrbOV/iRyQNBTDoiFJt+XEdRi0fZBHnk74AFbnP56ehybsA==", + "version": "5.0.0-alpha.109", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.109.tgz", + "integrity": "sha512-UQxoONPI3ntzxcD/cbFHl+Lp2xsVj6HpKmU9QhUZ2kZ2K2yej2QJyU1gnADoWl/Hu94VrvwSSRnjTjR3HvXO/g==", "requires": { "@babel/runtime": "^7.20.1", "@emotion/is-prop-valid": "^1.2.0", @@ -22700,19 +22701,19 @@ } }, "@mui/core-downloads-tracker": { - "version": "5.10.16", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.10.16.tgz", - "integrity": "sha512-eK9+olw2ZbXX+vGrtKnN01/vLP1aX0Lq0xok35bqWM1aB93Dcmky/xPNf8h31oJ/C+IzJBjZaZMEDzVZg4Qc0A==" + "version": "5.10.17", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.10.17.tgz", + "integrity": "sha512-iNwUuMA30nrN0tiEkeD3zaczv7Tk2jlZIDbXRnijAsYXkZtl/xEzQsVRIPYRDuyEz6D18vQJhV8h7gPUXEubTg==" }, "@mui/material": { - "version": "5.10.16", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.10.16.tgz", - "integrity": "sha512-JSHcDQQ+k30NKkCM/0KX6jq4F5LOrbFKZpS+cEl7scZWOCJpUPH5ccAT5a7O8wzrgNZ8Y9PnwzNvWBrfShpJFw==", + "version": "5.10.17", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.10.17.tgz", + "integrity": "sha512-Kuqgv1qI5HXnc/Xu426xhCGYBSKzplb+xFNLitbnIb92Qx8jmcpfNpFlDJa2kD2H6qP66rr/m4c/zMUfGX/xBQ==", "requires": { "@babel/runtime": "^7.20.1", - "@mui/base": "5.0.0-alpha.108", - "@mui/core-downloads-tracker": "^5.10.16", - "@mui/system": "^5.10.16", + "@mui/base": "5.0.0-alpha.109", + "@mui/core-downloads-tracker": "^5.10.17", + "@mui/system": "^5.10.17", "@mui/types": "^7.2.2", "@mui/utils": "^5.10.16", "@types/react-transition-group": "^4.4.5", @@ -22745,9 +22746,9 @@ } }, "@mui/system": { - "version": "5.10.16", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.10.16.tgz", - "integrity": "sha512-OqI9B1jZ9zQ/dmoqseku4CzdEs9DbLiiMOaWxC3WeAJxM1UavlCgXz0encqm93LIlmSL7TjuHN1/rW8BJCnU8A==", + "version": "5.10.17", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.10.17.tgz", + "integrity": "sha512-UYzAOSK7uxkMsUssqrIUW3lnOuQpU8vqh4hLwfSw+GYAnQo3qjK4m4NhlDx+pFpsjjiGnr3K+vrSH+aIAMbcLg==", "requires": { "@babel/runtime": "^7.20.1", "@mui/private-theming": "^5.10.16", @@ -22853,9 +22854,9 @@ "integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==" }, "@remix-run/router": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.3.tgz", - "integrity": "sha512-ceuyTSs7PZ/tQqi19YZNBc5X7kj1f8p+4DIyrcIYFY9h+hd1OKm4RqtiWldR9eGEvIiJfsqwM4BsuCtRIuEw6Q==" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.4.tgz", + "integrity": "sha512-gTL8H5USTAKOyVA4xczzDJnC3HMssdFa3tRlwBicXynx9XfiXwneHnYQogwSKpdCkjXISrEKSTtX62rLpNEVQg==" }, "@restart/hooks": { "version": "0.4.7", @@ -23371,9 +23372,9 @@ } }, "@types/jest": { - "version": "29.2.3", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.2.3.tgz", - "integrity": "sha512-6XwoEbmatfyoCjWRX7z0fKMmgYKe9+/HrviJ5k0X/tjJWHGAezZOfYaxqQKuzG/TvQyr+ktjm4jgbk0s4/oF2w==", + "version": "29.2.4", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.2.4.tgz", + "integrity": "sha512-PipFB04k2qTRPePduVLTRiPzQfvMeLwUN3Z21hsAKaB/W9IIzgB2pizCL466ftJlcyZqnHoC9ZHpxLGl3fS86A==", "requires": { "expect": "^29.0.0", "pretty-format": "^29.0.0" @@ -23412,9 +23413,9 @@ "integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==" }, "@types/node": { - "version": "18.11.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", - "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==" + "version": "18.11.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.11.tgz", + "integrity": "sha512-KJ021B1nlQUBLopzZmPBVuGU9un7WJd/W4ya7Ih02B4Uwky5Nja0yGYav2EfYIk0RR2Q9oVhf60S2XR1BCWJ2g==" }, "@types/parse-json": { "version": "4.0.0", @@ -23447,9 +23448,9 @@ "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==" }, "@types/react": { - "version": "18.0.25", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.25.tgz", - "integrity": "sha512-xD6c0KDT4m7n9uD4ZHi02lzskaiqcBxf4zi+tXZY98a04wvc0hi/TcCPC2FOESZi51Nd7tlUeOJY8RofL799/g==", + "version": "18.0.26", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.26.tgz", + "integrity": "sha512-hCR3PJQsAIXyxhTNSiDFY//LhnMZWpNNr5etoCqx/iUfGc5gXWtQR2Phl908jVR6uPXacojQWTg4qRpkxTuGug==", "requires": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -23560,9 +23561,9 @@ } }, "@types/yargs": { - "version": "17.0.15", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.15.tgz", - "integrity": "sha512-ZHc4W2dnEQPfhn06TBEdWaiUHEZAocYaiVMfwOipY5jcJt/251wVrKCBWBetGZWO5CF8tdb7L3DmdxVlZ2BOIg==", + "version": "17.0.16", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.16.tgz", + "integrity": "sha512-Mh3OP0oh8X7O7F9m5AplC+XHYLBWuPKNkGVD3gIZFLFebBnuFI2Nz5Sf8WLvwGxECJ8YjifQvFdh79ubODkdug==", "requires": { "@types/yargs-parser": "*" } @@ -23573,13 +23574,13 @@ "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==" }, "@typescript-eslint/eslint-plugin": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.45.0.tgz", - "integrity": "sha512-CXXHNlf0oL+Yg021cxgOdMHNTXD17rHkq7iW6RFHoybdFgQBjU3yIXhhcPpGwr1CjZlo6ET8C6tzX5juQoXeGA==", + "version": "5.45.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.45.1.tgz", + "integrity": "sha512-cOizjPlKEh0bXdFrBLTrI/J6B/QMlhwE9auOov53tgB+qMukH6/h8YAK/qw+QJGct/PTbdh2lytGyipxCcEtAw==", "requires": { - "@typescript-eslint/scope-manager": "5.45.0", - "@typescript-eslint/type-utils": "5.45.0", - "@typescript-eslint/utils": "5.45.0", + "@typescript-eslint/scope-manager": "5.45.1", + "@typescript-eslint/type-utils": "5.45.1", + "@typescript-eslint/utils": "5.45.1", "debug": "^4.3.4", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", @@ -23599,56 +23600,56 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.45.0.tgz", - "integrity": "sha512-DnRQg5+3uHHt/gaifTjwg9OKbg9/TWehfJzYHQIDJboPEbF897BKDE/qoqMhW7nf0jWRV1mwVXTaUvtB1/9Gwg==", + "version": "5.45.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.45.1.tgz", + "integrity": "sha512-WlXwY9dbmc0Lzu6xQOZ3yN8u/ws/1R8zPC16O217LMZJCbV2hJezqkWMUB+jMwguOJW+cukCDe92vcwwf8zwjQ==", "requires": { - "@typescript-eslint/utils": "5.45.0" + "@typescript-eslint/utils": "5.45.1" } }, "@typescript-eslint/parser": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.45.0.tgz", - "integrity": "sha512-brvs/WSM4fKUmF5Ot/gEve6qYiCMjm6w4HkHPfS6ZNmxTS0m0iNN4yOChImaCkqc1hRwFGqUyanMXuGal6oyyQ==", + "version": "5.45.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.45.1.tgz", + "integrity": "sha512-JQ3Ep8bEOXu16q0ztsatp/iQfDCtvap7sp/DKo7DWltUquj5AfCOpX2zSzJ8YkAVnrQNqQ5R62PBz2UtrfmCkA==", "requires": { - "@typescript-eslint/scope-manager": "5.45.0", - "@typescript-eslint/types": "5.45.0", - "@typescript-eslint/typescript-estree": "5.45.0", + "@typescript-eslint/scope-manager": "5.45.1", + "@typescript-eslint/types": "5.45.1", + "@typescript-eslint/typescript-estree": "5.45.1", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.45.0.tgz", - "integrity": "sha512-noDMjr87Arp/PuVrtvN3dXiJstQR1+XlQ4R1EvzG+NMgXi8CuMCXpb8JqNtFHKceVSQ985BZhfRdowJzbv4yKw==", + "version": "5.45.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.45.1.tgz", + "integrity": "sha512-D6fCileR6Iai7E35Eb4Kp+k0iW7F1wxXYrOhX/3dywsOJpJAQ20Fwgcf+P/TDtvQ7zcsWsrJaglaQWDhOMsspQ==", "requires": { - "@typescript-eslint/types": "5.45.0", - "@typescript-eslint/visitor-keys": "5.45.0" + "@typescript-eslint/types": "5.45.1", + "@typescript-eslint/visitor-keys": "5.45.1" } }, "@typescript-eslint/type-utils": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.45.0.tgz", - "integrity": "sha512-DY7BXVFSIGRGFZ574hTEyLPRiQIvI/9oGcN8t1A7f6zIs6ftbrU0nhyV26ZW//6f85avkwrLag424n+fkuoJ1Q==", + "version": "5.45.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.45.1.tgz", + "integrity": "sha512-aosxFa+0CoYgYEl3aptLe1svP910DJq68nwEJzyQcrtRhC4BN0tJAvZGAe+D0tzjJmFXe+h4leSsiZhwBa2vrA==", "requires": { - "@typescript-eslint/typescript-estree": "5.45.0", - "@typescript-eslint/utils": "5.45.0", + "@typescript-eslint/typescript-estree": "5.45.1", + "@typescript-eslint/utils": "5.45.1", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.45.0.tgz", - "integrity": "sha512-QQij+u/vgskA66azc9dCmx+rev79PzX8uDHpsqSjEFtfF2gBUTRCpvYMh2gw2ghkJabNkPlSUCimsyBEQZd1DA==" + "version": "5.45.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.45.1.tgz", + "integrity": "sha512-HEW3U0E5dLjUT+nk7b4lLbOherS1U4ap+b9pfu2oGsW3oPu7genRaY9dDv3nMczC1rbnRY2W/D7SN05wYoGImg==" }, "@typescript-eslint/typescript-estree": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.45.0.tgz", - "integrity": "sha512-maRhLGSzqUpFcZgXxg1qc/+H0bT36lHK4APhp0AEUVrpSwXiRAomm/JGjSG+kNUio5kAa3uekCYu/47cnGn5EQ==", + "version": "5.45.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.45.1.tgz", + "integrity": "sha512-76NZpmpCzWVrrb0XmYEpbwOz/FENBi+5W7ipVXAsG3OoFrQKJMiaqsBMbvGRyLtPotGqUfcY7Ur8j0dksDJDng==", "requires": { - "@typescript-eslint/types": "5.45.0", - "@typescript-eslint/visitor-keys": "5.45.0", + "@typescript-eslint/types": "5.45.1", + "@typescript-eslint/visitor-keys": "5.45.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -23667,15 +23668,15 @@ } }, "@typescript-eslint/utils": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.45.0.tgz", - "integrity": "sha512-OUg2JvsVI1oIee/SwiejTot2OxwU8a7UfTFMOdlhD2y+Hl6memUSL4s98bpUTo8EpVEr0lmwlU7JSu/p2QpSvA==", + "version": "5.45.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.45.1.tgz", + "integrity": "sha512-rlbC5VZz68+yjAzQBc4I7KDYVzWG2X/OrqoZrMahYq3u8FFtmQYc+9rovo/7wlJH5kugJ+jQXV5pJMnofGmPRw==", "requires": { "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.45.0", - "@typescript-eslint/types": "5.45.0", - "@typescript-eslint/typescript-estree": "5.45.0", + "@typescript-eslint/scope-manager": "5.45.1", + "@typescript-eslint/types": "5.45.1", + "@typescript-eslint/typescript-estree": "5.45.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0", "semver": "^7.3.7" @@ -23706,11 +23707,11 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.45.0.tgz", - "integrity": "sha512-jc6Eccbn2RtQPr1s7th6jJWQHBHI6GBVQkCHoJFQ5UreaKm59Vxw+ynQUPPY2u2Amquc+7tmEoC2G52ApsGNNg==", + "version": "5.45.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.45.1.tgz", + "integrity": "sha512-cy9ln+6rmthYWjH9fmx+5FU/JDpjQb586++x2FZlveq7GdGuLLW9a2Jcst2TGekH82bXpfmRNSwP9tyEs6RjvQ==", "requires": { - "@typescript-eslint/types": "5.45.0", + "@typescript-eslint/types": "5.45.1", "eslint-visitor-keys": "^3.3.0" } }, @@ -24175,9 +24176,9 @@ "integrity": "sha512-u2MVsXfew5HBvjsczCv+xlwdNnB1oQR9HlAcsejZttNjKKSkeDNVwB1vMThIUIFI9GoT57Vtk8iQLwqOfAkboA==" }, "axios": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.2.0.tgz", - "integrity": "sha512-zT7wZyNYu3N5Bu0wuZ6QccIf93Qk1eV8LOewxgjOZFd2DenOs98cJ7+Y6703d0wkaXGY6/nZd4EweJaHz9uzQw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.2.1.tgz", + "integrity": "sha512-I88cFiGu9ryt/tfVEi4kX2SITsvDddTajXTOFmt2uK1ZVA8LytjtdeyefdQWEf5PU8w+4SSJDoYnggflB5tW4A==", "requires": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -24619,9 +24620,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001434", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001434.tgz", - "integrity": "sha512-aOBHrLmTQw//WFa2rcF1If9fa3ypkC1wzqqiKHgfdrXTWcU8C4gKVZT77eQAPWN1APys3+uQ0Df07rKauXGEYA==" + "version": "1.0.30001436", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001436.tgz", + "integrity": "sha512-ZmWkKsnC2ifEPoWUvSAIGyOYwT+keAaaWPHiQ9DfMqS1t6tfuyFYoWR78TeZtznkEQ64+vGXH9cZrElwR2Mrxg==" }, "case-sensitive-paths-webpack-plugin": { "version": "2.4.0", @@ -25281,9 +25282,9 @@ } }, "decimal.js": { - "version": "10.4.2", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.2.tgz", - "integrity": "sha512-ic1yEvwT6GuvaYwBLLY6/aFFgjZdySKTE8en/fkU3QICTmRtgtSlFn0u0BXN06InZwtfCelR7j8LRiDI/02iGA==" + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" }, "dedent": { "version": "0.7.0", @@ -25764,9 +25765,9 @@ } }, "eslint": { - "version": "8.28.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.28.0.tgz", - "integrity": "sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.29.0.tgz", + "integrity": "sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg==", "requires": { "@eslint/eslintrc": "^1.3.3", "@humanwhocodes/config-array": "^0.11.6", @@ -26381,9 +26382,9 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" }, "fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.14.0.tgz", + "integrity": "sha512-eR2D+V9/ExcbF9ls441yIuN6TI2ED1Y2ZcA5BmMtJsOkWOFRJQ0Jt0g1UwqXJJVAb+V+umH5Dfr8oh4EVP7VVg==", "requires": { "reusify": "^1.0.4" } @@ -30191,11 +30192,11 @@ "integrity": "sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==" }, "language-tags": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.5.tgz", - "integrity": "sha512-qJhlO9cGXi6hBGKoxEG/sKZDAHD5Hnu9Hs4WbOY3pCWXDhw0N8x1NenNzm2EnNLkLkk7J2SdxAkDSbb6ftT+UQ==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.6.tgz", + "integrity": "sha512-HNkaCgM8wZgE/BZACeotAAgpL9FUjEnhgF0FVQMIgH//zqTPreLYMb3rWYkYAqPoF75Jwuycp1da7uz66cfFQg==", "requires": { - "language-subtag-registry": "~0.3.2" + "language-subtag-registry": "^0.3.20" } }, "leven": { @@ -30419,9 +30420,9 @@ "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==" }, "mini-css-extract-plugin": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.1.tgz", - "integrity": "sha512-viOoaUFy+Z2w43VsGPbtfwFrr0tKwDctK9dUofG5MBViYhD1noGFUzzDIVw0KPwCGUP+c7zqLxm+acuQs7zLzw==", + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.2.tgz", + "integrity": "sha512-EdlUizq13o0Pd+uCp+WO/JpkLvHRVGt97RqfeGhXqAcorYo1ypJSpkV+WDT0vY/kmh/p7wRdJNJtuyK540PXDw==", "requires": { "schema-utils": "^4.0.0" }, @@ -31139,9 +31140,9 @@ } }, "postcss-custom-properties": { - "version": "12.1.10", - "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-12.1.10.tgz", - "integrity": "sha512-U3BHdgrYhCrwTVcByFHs9EOBoqcKq4Lf3kXwbTi4hhq0qWhl/pDWq2THbv/ICX/Fl9KqeHBb8OVrTf2OaYF07A==", + "version": "12.1.11", + "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-12.1.11.tgz", + "integrity": "sha512-0IDJYhgU8xDv1KY6+VgUwuQkVtmYzRwu+dMjnmdMafXYv86SWqfxkc7qdDvWS38vsjaEtv8e0vGOUQrAiMBLpQ==", "requires": { "postcss-value-parser": "^4.2.0" } @@ -32136,20 +32137,20 @@ "integrity": "sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A==" }, "react-router": { - "version": "6.4.3", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.4.3.tgz", - "integrity": "sha512-BT6DoGn6aV1FVP5yfODMOiieakp3z46P1Fk0RNzJMACzE7C339sFuHebfvWtnB4pzBvXXkHP2vscJzWRuUjTtA==", + "version": "6.4.4", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.4.4.tgz", + "integrity": "sha512-SA6tSrUCRfuLWeYsTJDuriRqfFIsrSvuH7SqAJHegx9ZgxadE119rU8oOX/rG5FYEthpdEaEljdjDlnBxvfr+Q==", "requires": { - "@remix-run/router": "1.0.3" + "@remix-run/router": "1.0.4" } }, "react-router-dom": { - "version": "6.4.3", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.4.3.tgz", - "integrity": "sha512-MiaYQU8CwVCaOfJdYvt84KQNjT78VF0TJrA17SIQgNHRvLnXDJO6qsFqq8F/zzB1BWZjCFIrQpu4QxcshitziQ==", + "version": "6.4.4", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.4.4.tgz", + "integrity": "sha512-0Axverhw5d+4SBhLqLpzPhNkmv7gahUwlUVIOrRLGJ4/uwt30JVajVJXqv2Qr/LCwyvHhQc7YyK1Do8a9Jj7qA==", "requires": { - "@remix-run/router": "1.0.3", - "react-router": "6.4.3" + "@remix-run/router": "1.0.4", + "react-router": "6.4.4" } }, "react-scripts": { @@ -33272,9 +33273,9 @@ } }, "terser": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.0.tgz", - "integrity": "sha512-KjTV81QKStSfwbNiwlBXfcgMcOloyuRdb62/iLFPGBcVNF4EXjhdYBhYHmbJpiBrVxZhDvltE11j+LBQUxEEJg==", + "version": "5.16.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.1.tgz", + "integrity": "sha512-xvQfyfA1ayT0qdK47zskQgRZeWLoOQ8JQ6mIgRGVNwZKdQMU+5FkCBjmv4QjcrTzyZquRw2FVtlJSRUmMKQslw==", "requires": { "@jridgewell/source-map": "^0.3.2", "acorn": "^8.5.0", diff --git a/package.json b/package.json index dd6f8b4..d122104 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", "addeventlistener": "^2.0.0", - "axios": "^1.2.0", + "axios": "^1.2.1", "chart": "^0.1.2", "chart.js": "^4.0.1", "crypto-js": "^4.1.1", diff --git a/src/pages/Parametres.js b/src/pages/Parametres.js index ef72b59..3b81f26 100644 --- a/src/pages/Parametres.js +++ b/src/pages/Parametres.js @@ -42,9 +42,9 @@ const Parametre = () => {

Mot de passe

-
- Modifier -
+ + +
diff --git a/src/styles/components/_parametre.scss b/src/styles/components/_parametre.scss index 0448126..f81045a 100644 --- a/src/styles/components/_parametre.scss +++ b/src/styles/components/_parametre.scss @@ -196,6 +196,7 @@ body { display: flex; margin-left: 30px; align-items: center; + text-decoration: none; cursor: pointer; .bouton_modifierMDP { From d37cde2b4d7528edca46b0f211524ad1eb16e556 Mon Sep 17 00:00:00 2001 From: clverdoire Date: Tue, 6 Dec 2022 14:54:50 +0100 Subject: [PATCH 04/30] changement validation nouveau mot de passe --- src/pages/RestartPassword.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/pages/RestartPassword.js b/src/pages/RestartPassword.js index 45bb07c..e446148 100644 --- a/src/pages/RestartPassword.js +++ b/src/pages/RestartPassword.js @@ -19,8 +19,8 @@ function RestartPassword() { const location = useLocation(); const [password, setPassword] = useState(""); - const [confPassword, setConfPassword] = useState(""); const [newPassword, setNewPassword] = useState(""); + const [confNewPassword, setConfNewPassword] = useState(""); const navigate = useNavigate(); @@ -28,14 +28,14 @@ function RestartPassword() { setPassword(event.target.value); }; - function handleChangeConfPassword(event){ - setConfPassword(event.target.value); - }; - function handleChangeNewPassword(event){ setNewPassword(event.target.value); }; + function handleChangeConfNewPassword(event){ + setConfNewPassword(event.target.value) + }; + function checkRestartPassword(event){ const formData = new FormData(event.currentTarget); @@ -43,9 +43,9 @@ function RestartPassword() { event.preventDefault(); - if(password === confPassword) + if(newPassword === confNewPassword) { - const apiString = '/User/Auth/Password/' + Session.get("idUser") + "/" + CryptoJS.SHA256(confPassword).toString(CryptoJS.enc.Hex); + const apiString = '/User/Auth/Password/' + Session.get("idUser") + "/" + CryptoJS.SHA256(password).toString(CryptoJS.enc.Hex); api.get(apiString).then((response) => { const login = response.data; if (login.length > 0){ @@ -78,14 +78,14 @@ function RestartPassword() {

Mot de passe :

-

Confirmation mot de passe :

Nouveau mot de passe :

+

Confirmation nouveau mot de passe :

- +
From a7ac50415864cb03e782cdc189994d0fe72e651a Mon Sep 17 00:00:00 2001 From: Tristan Barlet Date: Tue, 6 Dec 2022 15:07:25 +0100 Subject: [PATCH 05/30] persistance calendrier en local --- server-api/api.js | 28 ++++++++++++++++++++- src/pages/Calendrier.js | 55 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 76 insertions(+), 7 deletions(-) diff --git a/server-api/api.js b/server-api/api.js index 2b36e9c..23c5405 100644 --- a/server-api/api.js +++ b/server-api/api.js @@ -270,4 +270,30 @@ app.get('/Contact/AllWithCustomerName', (req, res) => { console.log(result); res.send(result); }); -}); \ No newline at end of file +}); + +// Api obtenir l'emploi du temps du id + +app.get('/edt/:id', (req, res) => { + const id = req.params.id; + let sql = 'SELECT * FROM Events WHERE IdUserReceive = ?'; + db.query(sql, [id], (err, result) => { + if (err) throw err; + console.log(result); + res.send(result); + }); +}); + +app.put('/edt/Add/:id/:jour/:debut/:fin', (req, res) => { + + // let form = req.body; + + // console.log(form); + + // const sql = `INSERT INTO Events(firstname, idrole, login, password, phone, mail) VALUES ('${form.lastname}', '${form.firstname}', '${form.idrole}', '${form.login}', '${form.password}', '${form.phone}', '${form.mail}')`; + // db.query(sql , (err, result) => { + // if (err) throw err; + // console.log(result); + // res.send('Post added...' + result.insertId); + // }); +}); diff --git a/src/pages/Calendrier.js b/src/pages/Calendrier.js index 8619bbb..9e5fde3 100644 --- a/src/pages/Calendrier.js +++ b/src/pages/Calendrier.js @@ -8,6 +8,8 @@ import parse from "date-fns/parse"; import startOfWeek from "date-fns/startOfWeek"; import { Calendar, dateFnsLocalizer } from "react-big-calendar"; import "react-big-calendar/lib/css/react-big-calendar.css"; +import Session from 'react-session-api' +import axios from 'axios' const locales = { 'fr': require('date-fns/locale/fr') @@ -18,18 +20,57 @@ const locales = { startOfWeek, getDay, locales, - - }); +}); + +const api = axios.create({ + baseURL: 'http://localhost:8080' +}) + +const apiStringGetEvent = '/edt/' + Session.get("idUser"); - const events = [ - - ]; +const events = [] + +const recupererEvents = () => { + // api.get(apiStringGetEvent).then((response) => { + // response.forEach(element => { + // events.push({ + // title: element.Comment, + // start: new Date(element.jour+" "+element.StartTime), + // end: new Date(element.jour+" "+element.EndTime) + // }) + // }); + // }) + const event = [] + if (localStorage.getItem("events") !== null &&localStorage.getItem("events") !== "" && localStorage.getItem("events") !== []) { + JSON.parse(localStorage.getItem("events")).forEach(element => { + event.push({ + title: element.title, + start: new Date(element.start), + end: new Date(element.end) + }) + }); + return event + } + return []; + +} + +const envoyerNouvelleEvent = (event) => { + // const apiStringPostEvent = '/edt/' + Session.get("idUser"); + // api.post(apiStringPostEvent, { + // Comment: event.title, + // jour: event.start, + // StartTime: event.start, + // EndTime: event.end + // }) +} const Calendrier = () => { + const [theme, setTheme] = useState("light"); if (localStorage.getItem('theme') && localStorage.getItem("theme") !== '' && localStorage.getItem("theme") !== theme) { setTheme(localStorage.getItem("theme")) @@ -39,13 +80,15 @@ const Calendrier = () => { const [heureDebut, setHeureDebut] = useState(new Date()); const [heureFin, setHeureFin] = useState(new Date()); - const [allEvents, setAllEvents] = useState(events); + const [allEvents, setAllEvents] = useState(recupererEvents); function handleAddEvent() { const newEvent = { title: titre, start: new Date(jour+" "+heureDebut), end: new Date(jour+" "+heureFin) }; setAllEvents([...allEvents, newEvent]); + localStorage.setItem("events", JSON.stringify([...allEvents, newEvent])); } + return ( From d3be02e82ce822e4a18a4332e6b0ed156cb57c08 Mon Sep 17 00:00:00 2001 From: clverdoire Date: Tue, 6 Dec 2022 15:19:01 +0100 Subject: [PATCH 06/30] =?UTF-8?q?bouton=20d=C3=A9connexion=20ajout=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Parametres.js | 11 ++++++--- src/styles/components/_parametre.scss | 35 +++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/src/pages/Parametres.js b/src/pages/Parametres.js index 3b81f26..41663aa 100644 --- a/src/pages/Parametres.js +++ b/src/pages/Parametres.js @@ -49,7 +49,7 @@ const Parametre = () => {
- coucou + Général

Mode sombre

@@ -59,13 +59,18 @@ const Parametre = () => {
- coucou +

Coucou

+
+

Déconnexion

+ + + +
- // ); }; diff --git a/src/styles/components/_parametre.scss b/src/styles/components/_parametre.scss index f81045a..bb7880e 100644 --- a/src/styles/components/_parametre.scss +++ b/src/styles/components/_parametre.scss @@ -290,6 +290,7 @@ body { .three { display: flex; + flex-direction: column; width: auto; height: 40%; @@ -298,6 +299,40 @@ body { box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(15px); + + .text_three_haut { + display: flex; + margin: 10px; + } + + .déconnexion { + display: flex; + flex-direction: row; + justify-content: space-between; + margin-left: 10px; + margin-right: 10px; + padding: 10px; + + border-top: 1px solid black; + + .text_three { + display: flex; + } + + .bouton { + width: 100px; + height: 20px; + background-color: rgb(190, 189, 189); + border-radius: 5px; + border-radius: 5px; + box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25); + cursor: pointer; + + &:hover{ + background-color: lightgrey; + } + } + } } } } From 12f1d1ea923b20c0fbf57171c0e03a6515adeb4b Mon Sep 17 00:00:00 2001 From: clverdoire Date: Tue, 6 Dec 2022 15:21:40 +0100 Subject: [PATCH 07/30] modif --- src/pages/Parametres.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Parametres.js b/src/pages/Parametres.js index 41663aa..cc82880 100644 --- a/src/pages/Parametres.js +++ b/src/pages/Parametres.js @@ -59,7 +59,7 @@ const Parametre = () => {
-

Coucou

+

Autre

Déconnexion

From 660040ad1b3a88b062fa562f45d49f37bf9438a3 Mon Sep 17 00:00:00 2001 From: Jeremy DUCOURTHIAL Date: Tue, 6 Dec 2022 15:27:44 +0100 Subject: [PATCH 08/30] =?UTF-8?q?Ajout=20deuxi=C3=A8me=20graphique=20+=20e?= =?UTF-8?q?rror=20restart=20password=20+=20insert=20event=20dans=20la=20ba?= =?UTF-8?q?se=20de=20donn=C3=A9e=20+=20r=C3=A9cup=C3=A9ration=20dans=20la?= =?UTF-8?q?=20base=20(error)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server-api/api.js | 57 ++++++++++++++++++++++++++++++- src/pages/Analyse.js | 34 ++++++++++++++++--- src/pages/Calendrier.js | 66 +++++++++++++++++++++++++++++------- src/pages/RestartPassword.js | 12 +++---- 4 files changed, 146 insertions(+), 23 deletions(-) diff --git a/server-api/api.js b/server-api/api.js index 2b36e9c..15ed859 100644 --- a/server-api/api.js +++ b/server-api/api.js @@ -130,7 +130,22 @@ app.get('/Sale/Pie/:iduser/:month/:year', (req, res) => { const iduser = req.params.iduser; const month = req.params.month; const year = req.params.year; - let sql = 'SELECT DISTINCT SUM(s.amount) as total,cu.name FROM sales s,customers cu,contacts co WHERE co.iduser = ? AND co.idcustomer = cu.idcustomer AND cu.idcustomer = s.idcustomer AND ((s.month >= ? AND s.year = ?) OR s.year > ?) GROUP BY cu.name ORDER BY total DESC'; + let sql = 'SELECT DISTINCT SUM(s.amount) as total,cu.name FROM sales s,customers cu,contacts co WHERE co.iduser = ? AND co.idcustomer = cu.idcustomer AND cu.idcustomer = s.idcustomer AND ((s.month >= ? AND s.year = ?) OR s.year > ?) GROUP BY cu.name ORDER BY total DESC LIMIT 10'; + + db.query(sql, [iduser,month,year,year], (err, result) => { + if (err) throw err; + + console.log(result); + res.send(result); + }); +}); + +app.get('/Sale/Line/:iduser/:month/:year', (req, res) => { + + const iduser = req.params.iduser; + const month = req.params.month; + const year = req.params.year; + let sql = 'SELECT DISTINCT SUM(s.amount) as total,s.year,s.month FROM sales s,customers cu,contacts co WHERE co.iduser = 41 AND co.idcustomer = cu.idcustomer AND cu.idcustomer = s.idcustomer AND ((s.month >= 12 AND s.year = 2021) OR s.year > 2021) GROUP BY s.year,s.month ORDER BY s.year,s.month'; db.query(sql, [iduser,month,year,year], (err, result) => { if (err) throw err; @@ -267,6 +282,46 @@ 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); + res.send(result); + }); +}); + +app.get('/Contact/:iduser', (req, res) => { + + const iduser = req.params.iduser; + + let sql = 'SELECT c.idcontact,c.firstname,c.lastname,cu.name FROM contacts c,customers cu WHERE cu.idcustomer = c.idcustomer AND c.iduser = ?'; + db.query(sql,[iduser], (err, result) => { + if (err) throw err; + console.log(result); + res.send(result); + }); +}); + +app.post('/Event/Add', (req, res) => { + + let form = req.body; + + console.log(form); + + const sql = `INSERT INTO events(date,starttime,endtime,comment,idusersend,iduserreceive,idcontact) VALUES ('${form.date}', '${form.starttime}', '${form.endtime}', '${form.comment}', '${form.idusersend}', '${form.iduserreceive}', '${form.idcontact}')`; + db.query(sql , (err, result) => { + if (err) throw err; + console.log(result); + res.send('Post added...'); + }); +}); + +app.get('/Event/:iduser', (req, res) => { + + const iduser = req.params.iduser; + + let sql = 'SELECT * FROM events e where e.iduserreceive = ?'; + + db.query(sql,[iduser], (err, result) => { + if (err) throw err; + console.log(result); res.send(result); }); diff --git a/src/pages/Analyse.js b/src/pages/Analyse.js index 34c4fd1..1531c35 100644 --- a/src/pages/Analyse.js +++ b/src/pages/Analyse.js @@ -2,7 +2,7 @@ import React, {useState,useEffect} from 'react'; import axios from 'axios' import Chart from 'chart.js/auto' import NavigationDashboard from '../components/NavigationDashboard'; -import { Pie } from "react-chartjs-2"; +import { Pie,Line } from "react-chartjs-2"; import { Chart as ChartJS, ArcElement, Tooltip, Legend } from 'chart.js'; import { setDefaultLocale } from 'react-datepicker'; import { private_excludeVariablesFromRoot } from '@mui/material'; @@ -22,6 +22,7 @@ const Analyse = () => { } const [pieDatas, setPieDatas] = useState([]); + const [lineDatas, setLineDatas] = useState([]); useEffect(() => { const date = new Date(); @@ -67,6 +68,11 @@ const Analyse = () => { setPieDatas(response.data); }); + + const apiStringLine = '/Sale/Line/' + Session.get("idUser") + '/' + month + '/' + year; + api.get(apiStringLine).then((response) => { + setLineDatas(response.data); + }); }, []); const data = { @@ -102,13 +108,33 @@ const Analyse = () => { data.datasets[0].data[i] = pieDatas[i].total; } + const dataH = { + labels: [], + datasets: [ + { + label: 'Sales', + fill: true, + data: [], + backgroundColor: 'rgba(255, 99, 132, 0.2)', + borderColor:'rgba(255, 99, 132, 1)', + borderWidth: 1, + }, + ], + }; + + for(let i = 0; i < lineDatas.length; i++) + { + console.log(lineDatas); + dataH.labels[i] = lineDatas[i].month +"/" +lineDatas[i].year; + dataH.datasets[0].data[i] = lineDatas[i].total; + } + return (
- {/* Create an analysis page */}

Analyse

@@ -129,10 +155,10 @@ const Analyse = () => {
-

coucou2

+

Courbe des ventes

- coucou21 +
diff --git a/src/pages/Calendrier.js b/src/pages/Calendrier.js index 8619bbb..4418d5c 100644 --- a/src/pages/Calendrier.js +++ b/src/pages/Calendrier.js @@ -1,6 +1,10 @@ -import React, { useState } from 'react'; +import React, { useState,useEffect } from 'react'; import "react-datepicker/dist/react-datepicker.css"; import NavigationDashboard from '../components/NavigationDashboard'; +import axios from 'axios'; +import Session from 'react-session-api'; +import Select, { SelectChangeEvent } from '@mui/material/Select'; +import MenuItem from '@mui/material/MenuItem'; import format from "date-fns/format"; import getDay from "date-fns/getDay"; @@ -9,26 +13,51 @@ import startOfWeek from "date-fns/startOfWeek"; import { Calendar, dateFnsLocalizer } from "react-big-calendar"; import "react-big-calendar/lib/css/react-big-calendar.css"; + +const api = axios.create({ + baseURL: 'http://localhost:8080' +}) + const locales = { 'fr': require('date-fns/locale/fr') - }; - const localizer = dateFnsLocalizer({ +}; +const localizer = dateFnsLocalizer({ format, parse, startOfWeek, getDay, locales, - }); +}); - const events = [ +const events = [ - ]; +]; - +function Calendrier(){ + + const [contacts, setContacts] = useState([]); + const [events, setEvents] = useState([]); + const [selectedContact, setSelectedContact] = useState(1); + useEffect(() =>{ + const apiString = '/Contact/' + Session.get("idUser"); + api.get(apiString).then((response) => { + setContacts(response.data); + setSelectedContact(response.data[0].idcontact) + }); -const Calendrier = () => { + const apiStringEvent = '/Event/' + Session.get("idUser"); + api.get(apiStringEvent).then((response) => { + setEvents(response.data); + }); + + events.forEach(event => { + const newEvent = { title: event.comment, start: new Date(event.date+" "+event.starttime), end: new Date(event.date+" "+event.endtime) }; + setAllEvents([...allEvents, newEvent]); + console.log("here"); + }); + }, []); const [theme, setTheme] = useState("light"); if (localStorage.getItem('theme') && localStorage.getItem("theme") !== '' && localStorage.getItem("theme") !== theme) { @@ -43,9 +72,17 @@ const Calendrier = () => { function handleAddEvent() { const newEvent = { title: titre, start: new Date(jour+" "+heureDebut), end: new Date(jour+" "+heureFin) }; + const newEventBD = { date: jour,starttime: heureDebut,endtime: heureFin,comment: titre, idusersend: Session.get("idUser"),iduserreceive: Session.get("idUser"), idcontact: selectedContact}; + api.post('/Event/Add', newEventBD).then (function(response) { + console.log(response.data); + }); setAllEvents([...allEvents, newEvent]); } + function handleChangeContact(event){ + setSelectedContact(event.target.value); + }; + return ( @@ -74,10 +111,15 @@ const Calendrier = () => { onChange={(e) => setHeureDebut(e.target.value)} /> setHeureFin(e.target.value)} /> - - - - +
Retour From 1dfe1947272667397cd881ebf153fe35cc368a99 Mon Sep 17 00:00:00 2001 From: Jeremy DUCOURTHIAL Date: Tue, 6 Dec 2022 22:55:17 +0100 Subject: [PATCH 09/30] =?UTF-8?q?(error)=20mais=20merge=20r=C3=A9ussi=20su?= =?UTF-8?q?r=20le=20calendrier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Calendrier.js | 78 ++++++++++------------------------------- 1 file changed, 18 insertions(+), 60 deletions(-) diff --git a/src/pages/Calendrier.js b/src/pages/Calendrier.js index 727a6da..bef41d7 100644 --- a/src/pages/Calendrier.js +++ b/src/pages/Calendrier.js @@ -12,8 +12,6 @@ import parse from "date-fns/parse"; import startOfWeek from "date-fns/startOfWeek"; import { Calendar, dateFnsLocalizer } from "react-big-calendar"; import "react-big-calendar/lib/css/react-big-calendar.css"; -import Session from 'react-session-api' -import axios from 'axios' const api = axios.create({ @@ -31,69 +29,30 @@ const localizer = dateFnsLocalizer({ locales, }); -const apiStringGetEvent = '/edt/' + Session.get("idUser"); - -const events = [] - -const recupererEvents = () => { - // api.get(apiStringGetEvent).then((response) => { - // response.forEach(element => { - // events.push({ - // title: element.Comment, - // start: new Date(element.jour+" "+element.StartTime), - // end: new Date(element.jour+" "+element.EndTime) - // }) - // }); - // }) - const event = [] - if (localStorage.getItem("events") !== null &&localStorage.getItem("events") !== "" && localStorage.getItem("events") !== []) { - JSON.parse(localStorage.getItem("events")).forEach(element => { - event.push({ - title: element.title, - start: new Date(element.start), - end: new Date(element.end) - }) - }); - return event - } - - return []; - -} - function Calendrier(){ const [contacts, setContacts] = useState([]); const [events, setEvents] = useState([]); const [selectedContact, setSelectedContact] = useState(1); -const envoyerNouvelleEvent = (event) => { - // const apiStringPostEvent = '/edt/' + Session.get("idUser"); - // api.post(apiStringPostEvent, { - // Comment: event.title, - // jour: event.start, - // StartTime: event.start, - // EndTime: event.end - // }) -} - - useEffect(() =>{ - const apiString = '/Contact/' + Session.get("idUser"); - api.get(apiString).then((response) => { - setContacts(response.data); - setSelectedContact(response.data[0].idcontact) - }); - const apiStringEvent = '/Event/' + Session.get("idUser"); - api.get(apiStringEvent).then((response) => { - setEvents(response.data); - }); +useEffect(() =>{ + const apiString = '/Contact/' + Session.get("idUser"); + api.get(apiString).then((response) => { + setContacts(response.data); + setSelectedContact(response.data[0].idcontact) + }); - events.forEach(event => { - const newEvent = { title: event.comment, start: new Date(event.date+" "+event.starttime), end: new Date(event.date+" "+event.endtime) }; - setAllEvents([...allEvents, newEvent]); - console.log("here"); - }); - }, []); + const apiStringEvent = '/Event/' + Session.get("idUser"); + api.get(apiStringEvent).then((response) => { + setEvents(response.data); + }); + + events.forEach(event => { + const newEvent = { title: event.comment, start: new Date(event.date+" "+event.starttime), end: new Date(event.date+" "+event.endtime) }; + setAllEvents([...allEvents, newEvent]); + console.log("here"); + }); +}, []); const [theme, setTheme] = useState("light"); @@ -105,7 +64,7 @@ const envoyerNouvelleEvent = (event) => { const [heureDebut, setHeureDebut] = useState(new Date()); const [heureFin, setHeureFin] = useState(new Date()); - const [allEvents, setAllEvents] = useState(recupererEvents); + const [allEvents, setAllEvents] = useState(events); function handleAddEvent() { const newEvent = { title: titre, start: new Date(jour+" "+heureDebut), end: new Date(jour+" "+heureFin) }; @@ -114,7 +73,6 @@ const envoyerNouvelleEvent = (event) => { console.log(response.data); }); setAllEvents([...allEvents, newEvent]); - localStorage.setItem("events", JSON.stringify([...allEvents, newEvent])); } function handleChangeContact(event){ From c9c964d4657bbfb1f1dca52afa0bfa577a0d3c46 Mon Sep 17 00:00:00 2001 From: Maxence Lanone Date: Fri, 9 Dec 2022 10:36:55 +0100 Subject: [PATCH 10/30] ajout contact presque ok --- .vscode/launch.json | 34 +++++++++++++++++++++ server-api/api.js | 2 +- src/components/Contact/AddContact.js | 45 ++++++++++++++-------------- src/pages/Admin_create.js | 1 + 4 files changed, 59 insertions(+), 23 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..4b52bef --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,34 @@ +{ + // Utilisez IntelliSense pour en savoir plus sur les attributs possibles. + // Pointez pour afficher la description des attributs existants. + // Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Launch via NPM", + "request": "launch", + "runtimeArgs": [ + "run-script", + "debug" + ], + "runtimeExecutable": "npm", + "skipFiles": [ + "/**" + ], + "type": "node" + }, + { + "name": "Listen for Xdebug", + "type": "php", + "request": "launch", + "port": 9003 + }, + { + "type": "chrome", + "request": "launch", + "name": "Lancer Chrome en utilisant localhost", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/server-api/api.js b/server-api/api.js index 8117453..0e318fa 100644 --- a/server-api/api.js +++ b/server-api/api.js @@ -216,7 +216,7 @@ app.get('/Contact/AllWithCustomerName', (req, res) => { }); app.get('/Entreprise/All', (req, res) => { - let sql = 'SELECT * FROM customers ORDER BY name'; + let sql = 'SELECT idcustomer,name FROM customers ORDER BY name'; db.query(sql, (err, result) => { if (err) throw err; console.log(result); diff --git a/src/components/Contact/AddContact.js b/src/components/Contact/AddContact.js index 26a6e71..b8eb6ae 100644 --- a/src/components/Contact/AddContact.js +++ b/src/components/Contact/AddContact.js @@ -13,7 +13,7 @@ const api = axios.create({ baseURL: 'http://localhost:8080' }) -function AddContact(props) { +function AddContact() { const [loginError, setLoginError] = useState(false); const [entreprises, setEntreprises] = useState([]); @@ -29,37 +29,38 @@ function AddContact(props) { function handleChangeEntreprise(event){ setSelectedIdEntreprise(event.target.value); + console.log("je suis dans handleChangeEntreprise"); }; - function checkAdd(event){ + // function checkAdd(event){ - event.preventDefault(); + // event.preventDefault(); - const formData = new FormData(event.currentTarget); - const values = Object.fromEntries(formData.entries()); - console.log(values.name); - api.get('/Contact/Exist/'+ values.login).then((response) => { - const login = response.data; - if (login.length > 0){ - setLoginError(true); - } - else { - setLoginError(false); + // const formData = new FormData(event.currentTarget); + // const values = Object.fromEntries(formData.entries()); + // console.log(values.name); + // api.get('/Contact/Exist/'+ values.login).then((response) => { + // const login = response.data; + // if (login.length > 0){ + // setLoginError(true); + // } + // else { + // setLoginError(false); - api.post('/Contact/Add', values).then (function(response) { - console.log(response.data); - }); + // api.post('/Contact/Add', values).then (function(response) { + // console.log(response.data); + // }); - navigate("/Repertoire"); - } - }); - }; + // navigate("/Repertoire"); + // } + // }); + // }; return (

Ajouter un nouveau contact

- +
@@ -92,4 +93,4 @@ function AddContact(props) { ) } -export default AddContact +export default AddContact; diff --git a/src/pages/Admin_create.js b/src/pages/Admin_create.js index b9d2528..4d23907 100644 --- a/src/pages/Admin_create.js +++ b/src/pages/Admin_create.js @@ -28,6 +28,7 @@ function Admin_create() { function handleChangeRole(event){ setSelectedIdRole(event.target.value); + console.log(event.target.value); }; function checkAdd(event){ From e10cc6291f3aa7543d21b28a6c1b725ad84925ff Mon Sep 17 00:00:00 2001 From: Maxence Lanone Date: Fri, 9 Dec 2022 10:37:54 +0100 Subject: [PATCH 11/30] ajout contact presque ok (ajout mais crash de la base apres car manque authentification) --- package-lock.json | 33 +++++++++++++++----- package.json | 3 +- server-api/1 | 1 + server-api/api.js | 9 +++--- server-api/kill | 1 + src/components/Contact/AddContact.js | 45 ++++++++++++++-------------- 6 files changed, 57 insertions(+), 35 deletions(-) create mode 100644 server-api/1 create mode 100644 server-api/kill diff --git a/package-lock.json b/package-lock.json index 6583b16..61260d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "addeventlistener": "^2.0.0", "axios": "^1.2.0", "chart": "^0.1.2", - "chart.js": "^3.9.1", + "chart.js": "^4.0.1", "crypto-js": "^4.1.1", "darkreader": "^4.9.58", "date-fns": "^2.29.3", @@ -30,6 +30,7 @@ "pg": "^8.8.0", "react": "^18.2.0", "react-big-calendar": "^1.5.0", + "react-chartjs-2": "^5.0.1", "react-datepicker": "^4.8.0", "react-dom": "^18.2.0", "react-loading": "^2.0.3", @@ -6127,9 +6128,12 @@ } }, "node_modules/chart.js": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.9.1.tgz", - "integrity": "sha512-Ro2JbLmvg83gXF5F4sniaQ+lTbSv18E+TIf2cOeiH1Iqd2PGFOtem+DUufMZsCJwFE7ywPOpfXFBwRTGq7dh6w==" + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.0.1.tgz", + "integrity": "sha512-5/8/9eBivwBZK81mKvmIwTb2Pmw4D/5h1RK9fBWZLLZ8mCJ+kfYNmV9rMrGoa5Hgy2/wVDBMLSUDudul2/9ihA==", + "engines": { + "pnpm": "^7.0.0" + } }, "node_modules/check-types": { "version": "11.1.2", @@ -14776,6 +14780,15 @@ "react-dom": "^16.14.0 || ^17 || ^18" } }, + "node_modules/react-chartjs-2": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-5.0.1.tgz", + "integrity": "sha512-u38C9OxynlNCBp+79grgXRs7DSJ9w8FuQ5/HO5FbYBbri8HSZW+9SWgjVshLkbXBfXnMGWakbHEtvN0nL2UG7Q==", + "peerDependencies": { + "chart.js": "^4.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/react-datepicker": { "version": "4.8.0", "resolved": "https://registry.npmjs.org/react-datepicker/-/react-datepicker-4.8.0.tgz", @@ -22197,9 +22210,9 @@ } }, "chart.js": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.9.1.tgz", - "integrity": "sha512-Ro2JbLmvg83gXF5F4sniaQ+lTbSv18E+TIf2cOeiH1Iqd2PGFOtem+DUufMZsCJwFE7ywPOpfXFBwRTGq7dh6w==" + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.0.1.tgz", + "integrity": "sha512-5/8/9eBivwBZK81mKvmIwTb2Pmw4D/5h1RK9fBWZLLZ8mCJ+kfYNmV9rMrGoa5Hgy2/wVDBMLSUDudul2/9ihA==" }, "check-types": { "version": "11.1.2", @@ -28276,6 +28289,12 @@ "uncontrollable": "^7.2.1" } }, + "react-chartjs-2": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-5.0.1.tgz", + "integrity": "sha512-u38C9OxynlNCBp+79grgXRs7DSJ9w8FuQ5/HO5FbYBbri8HSZW+9SWgjVshLkbXBfXnMGWakbHEtvN0nL2UG7Q==", + "requires": {} + }, "react-datepicker": { "version": "4.8.0", "resolved": "https://registry.npmjs.org/react-datepicker/-/react-datepicker-4.8.0.tgz", diff --git a/package.json b/package.json index 10f2b72..11d87d7 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "addeventlistener": "^2.0.0", "axios": "^1.2.0", "chart": "^0.1.2", - "chart.js": "^3.9.1", + "chart.js": "^4.0.1", "crypto-js": "^4.1.1", "darkreader": "^4.9.58", "date-fns": "^2.29.3", @@ -25,6 +25,7 @@ "pg": "^8.8.0", "react": "^18.2.0", "react-big-calendar": "^1.5.0", + "react-chartjs-2": "^5.0.1", "react-datepicker": "^4.8.0", "react-dom": "^18.2.0", "react-loading": "^2.0.3", diff --git a/server-api/1 b/server-api/1 new file mode 100644 index 0000000..0a1c474 --- /dev/null +++ b/server-api/1 @@ -0,0 +1 @@ +703 diff --git a/server-api/api.js b/server-api/api.js index 0e318fa..751c6d4 100644 --- a/server-api/api.js +++ b/server-api/api.js @@ -224,12 +224,11 @@ app.get('/Entreprise/All', (req, res) => { }); }); -app.get('/Contact/Exist/:login', (req, res) => { - - const login = req.params.login; - let sql = 'SELECT idContact FROM contact WHERE login = ?'; +app.get('/Contact/Exist/:phone', (req, res) => { + const phone = req.params.phone + let sql = 'SELECT idcontact FROM contacts WHERE phone = ?'; - db.query(sql, [login], (err, result) => { + db.query(sql, [phone], (err, result) => { if (err) throw err; console.log(result); diff --git a/server-api/kill b/server-api/kill new file mode 100644 index 0000000..0a1c474 --- /dev/null +++ b/server-api/kill @@ -0,0 +1 @@ +703 diff --git a/src/components/Contact/AddContact.js b/src/components/Contact/AddContact.js index b8eb6ae..1a2d794 100644 --- a/src/components/Contact/AddContact.js +++ b/src/components/Contact/AddContact.js @@ -24,6 +24,7 @@ function AddContact() { useEffect(() =>{ api.get('/Entreprise/All').then((response) => { setEntreprises(response.data); + console.log(entreprises); }); }, []); @@ -32,35 +33,35 @@ function AddContact() { console.log("je suis dans handleChangeEntreprise"); }; - // function checkAdd(event){ + function checkAdd(event){ - // event.preventDefault(); + event.preventDefault(); - // const formData = new FormData(event.currentTarget); - // const values = Object.fromEntries(formData.entries()); - // console.log(values.name); - // api.get('/Contact/Exist/'+ values.login).then((response) => { - // const login = response.data; - // if (login.length > 0){ - // setLoginError(true); - // } - // else { - // setLoginError(false); + const formData = new FormData(event.currentTarget); + const values = Object.fromEntries(formData.entries()); + console.log(values.name); + api.get('/Contact/Exist/'+ values.idcontact).then((response) => { + const login = response.data; + if (login.length > 0){ + setLoginError(true); + } + else { + setLoginError(false); - // api.post('/Contact/Add', values).then (function(response) { - // console.log(response.data); - // }); - - // navigate("/Repertoire"); - // } - // }); - // }; + api.post('/Contact/Add', values).then (function(response) { + console.log(response.data); + }); + + navigate("/Repertoire"); + } + }); + }; return (

Ajouter un nouveau contact

- +
@@ -78,7 +79,7 @@ function AddContact() { placeholder="Téléphone..." pattern="[0-9]{10}" required/>
From 400c939e48961acc9c64c763e38ecf31195e3cde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?cl=C3=A9ment?= Date: Fri, 9 Dec 2022 10:54:16 +0100 Subject: [PATCH 12/30] correction bug page repertoire --- src/styles/components/_repertoire.scss | 163 +++++++++++++------------ 1 file changed, 83 insertions(+), 80 deletions(-) diff --git a/src/styles/components/_repertoire.scss b/src/styles/components/_repertoire.scss index 7ed5f78..8ef8b6f 100644 --- a/src/styles/components/_repertoire.scss +++ b/src/styles/components/_repertoire.scss @@ -93,14 +93,14 @@ body { .nav_bar_verticale { display: flex; flex-direction: column; - justify-content: space-evenly; + justify-content: space-around; align-items: center; width: 5%; margin: 5px 5px 10px 10px; background: rgba(255, 255, 255, 0.3); border-radius: 15px; - box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); + box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(15px); @@ -156,106 +156,109 @@ body { } } } + } + + .contenu { + width: 94.3%; + height: auto; + margin: 5px 10px 10px 5px; - .contenu { + .searchAndAddButton { + height: 100px; + display: flex; + flex-direction: row; + align-items: center; width: 100%; + justify-content: space-between; - .searchAndAddButton { - height: 100px; + .boutonAddContact { display: flex; - flex-direction: row; + justify-content: center; align-items: center; + height: 40px; + min-width: 150px; + margin: 30px 30px; + border-radius: 25px; + box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); + } + + .input_box { + display: flex; + justify-content: center; + align-items: center; + position: relative; + height: 40px; + max-width: 350px; width: 100%; - justify-content: space-between; + margin: 30px 30px; + border-radius: 25px; + box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); - .boutonAddContact { - display: flex; - justify-content: center; - align-items: center; - height: 40px; - min-width: 150px; - margin: 30px 30px; + input { + position: relative; + width: 100%; + height: 100%; + padding: 0 15px 0 65px; + outline: none; + border: none; border-radius: 25px; - box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); + font-size: 16px; + font-weight: 400; + color: #333; } - .input_box { + .search { display: flex; - justify-content: center; align-items: center; - position: relative; - height: 40px; - max-width: 350px; - width: 100%; - margin: 30px 30px; - border-radius: 25px; - box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); - - input { - position: relative; - width: 100%; - height: 100%; - padding: 0 15px 0 65px; - outline: none; - border: none; - border-radius: 25px; - font-size: 16px; - font-weight: 400; - color: #333; - } + justify-content: center; + position: absolute; + left: 0; + top: 0; + height: 100%; + width: 60px; + border-radius: 25px 0 0 25px; - .search { - display: flex; - align-items: center; - justify-content: center; - position: absolute; - left: 0; - top: 0; - height: 100%; - width: 60px; - border-radius: 25px 0 0 25px; - - .search-icon { - font-size: 30px; - color: black; - } + .search-icon { + font-size: 30px; + color: black; } } - } - .tabListContact { - margin-bottom: 20px; - padding-right: 10px; - height: 82%; - scroll-behavior: smooth; - overflow-y: scroll; + } - &::-webkit-scrollbar { - width: 15px; - } + .tabListContact { + margin-bottom: 20px; + padding-right: 10px; + height: 82%; + scroll-behavior: smooth; + overflow-y: scroll; - &::-webkit-scrollbar-track { - background: #f1f1f1; - } + &::-webkit-scrollbar { + width: 15px; + } - &::-webkit-scrollbar-thumb { - background: #888; - border-radius: 10px; - } + &::-webkit-scrollbar-track { + background: #f1f1f1; + } - &::-webkit-scrollbar-thumb:hover { - background: #555; - } - .photoContact{ - width: 50px; - height: 50px; - border-radius: 50%; - object-fit: cover; - border: 1px solid black; - } + &::-webkit-scrollbar-thumb { + background: #888; + border-radius: 10px; + } + + &::-webkit-scrollbar-thumb:hover { + background: #555; + } + + .photoContact { + width: 50px; + height: 50px; + border-radius: 50%; + object-fit: cover; + border: 1px solid black; } } } } -} \ No newline at end of file +} From a024b2da3800a8edc85636c9fcc60f8f47a6abea Mon Sep 17 00:00:00 2001 From: Maxence Lanone Date: Fri, 9 Dec 2022 11:02:09 +0100 Subject: [PATCH 13/30] ajout opt mac --- .vscode/c_cpp_properties.json | 18 ++++++++++ .vscode/launch.json | 65 +++++++++++++++++++---------------- .vscode/settings.json | 36 +++++++++++++++++++ 3 files changed, 89 insertions(+), 30 deletions(-) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/settings.json diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..980fd57 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,18 @@ +{ + "configurations": [ + { + "name": "macos-clang-arm64", + "includePath": [ + "${workspaceFolder}/**" + ], + "compilerPath": "/usr/bin/clang", + "cStandard": "${default}", + "cppStandard": "${default}", + "intelliSenseMode": "macos-clang-arm64", + "compilerArgs": [ + "" + ] + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 4b52bef..1f47c3b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,34 +1,39 @@ { - // Utilisez IntelliSense pour en savoir plus sur les attributs possibles. - // Pointez pour afficher la description des attributs existants. - // Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ + "version": "0.2.0", + "configurations": [ { - "name": "Launch via NPM", - "request": "launch", - "runtimeArgs": [ - "run-script", - "debug" - ], - "runtimeExecutable": "npm", - "skipFiles": [ - "/**" - ], - "type": "node" + "name": "Launch via NPM", + "request": "launch", + "runtimeArgs": [ + "run-script", + "debug" + ], + "runtimeExecutable": "npm", + "skipFiles": [ + "/**" + ], + "type": "node" }, - { - "name": "Listen for Xdebug", - "type": "php", - "request": "launch", - "port": 9003 - }, - { - "type": "chrome", - "request": "launch", - "name": "Lancer Chrome en utilisant localhost", - "url": "http://localhost:8080", - "webRoot": "${workspaceFolder}" - } - ] + { + "name": "Listen for Xdebug", + "type": "php", + "request": "launch", + "port": 9003 + }, + { + "type": "chrome", + "request": "launch", + "name": "Lancer Chrome en utilisant localhost", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}" + }, + { + "name": "C/C++ Runner: Debug Session", + "type": "lldb", + "request": "launch", + "args": [], + "cwd": "/Users/malanone/JTT_Production/JTT_CrM", + "program": "/Users/malanone/JTT_Production/JTT_CrM/build/Debug/outDebug" + } + ] } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..50d1b0f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,36 @@ +{ + "C_Cpp_Runner.cCompilerPath": "clang", + "C_Cpp_Runner.cppCompilerPath": "clang++", + "C_Cpp_Runner.debuggerPath": "lldb", + "C_Cpp_Runner.cStandard": "", + "C_Cpp_Runner.cppStandard": "", + "C_Cpp_Runner.msvcBatchPath": "", + "C_Cpp_Runner.useMsvc": false, + "C_Cpp_Runner.warnings": [ + "-Wall", + "-Wextra", + "-Wpedantic", + "-Wshadow", + "-Wformat=2", + "-Wconversion", + "-Wnull-dereference", + "-Wsign-conversion" + ], + "C_Cpp_Runner.enableWarnings": true, + "C_Cpp_Runner.warningsAsError": false, + "C_Cpp_Runner.compilerArgs": [], + "C_Cpp_Runner.linkerArgs": [], + "C_Cpp_Runner.includePaths": [], + "C_Cpp_Runner.includeSearch": [ + "*", + "**/*" + ], + "C_Cpp_Runner.excludeSearch": [ + "**/build", + "**/build/**", + "**/.*", + "**/.*/**", + "**/.vscode", + "**/.vscode/**" + ] +} \ No newline at end of file From f1a45193af6cb4bcc92145ebf700d0fe330a623f Mon Sep 17 00:00:00 2001 From: Maxence LANONE Date: Fri, 9 Dec 2022 11:09:20 +0100 Subject: [PATCH 14/30] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.gitignore'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 28f1ba7..ccde885 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules -.DS_Store \ No newline at end of file +.DS_Store +.vs From 2130aa56b11e839c92e3dd5482eae5cb99cf95a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?cl=C3=A9ment?= Date: Fri, 9 Dec 2022 12:11:48 +0100 Subject: [PATCH 15/30] gestion bug affichage ensemble page admin --- src/pages/Admin_create.js | 4 +- src/pages/Admin_modif.js | 10 +- src/pages/Admin_supp.js | 32 ++-- src/styles/components/_admin.scss | 282 ++++++++++++++++++------------ 4 files changed, 192 insertions(+), 136 deletions(-) diff --git a/src/pages/Admin_create.js b/src/pages/Admin_create.js index 3b21dbe..e37ea9b 100644 --- a/src/pages/Admin_create.js +++ b/src/pages/Admin_create.js @@ -63,7 +63,7 @@ function Admin_create() {
- +

Nom :

Prénom :

@@ -74,7 +74,7 @@ function Admin_create() {

Mot de passe :

- +
- +
-

Nom :

+
Nom :

Prénom :

Login :

Rôle :

@@ -106,7 +106,7 @@ function Admin_modif() {

Mail :

- + @@ -124,8 +124,8 @@ function Admin_modif() { - - Réinitialiser le mot de passe + + Réinitialiser mot de passe
diff --git a/src/pages/Admin_supp.js b/src/pages/Admin_supp.js index 0e878aa..ea6005d 100644 --- a/src/pages/Admin_supp.js +++ b/src/pages/Admin_supp.js @@ -2,15 +2,15 @@ import React, { useState, useEffect } from 'react'; import axios from 'axios' import NavigationAdmin from '../components/NavigationAdmin.js'; import { NavLink, useLocation } from "react-router-dom"; -import { TableContainer,Table,TableHead,TableBody,TableRow,TableCell } from '@mui/material'; +import { TableContainer, Table, TableHead, TableBody, TableRow, TableCell } from '@mui/material'; import { Paper } from '@mui/material'; import { useNavigate } from "react-router-dom"; const api = axios.create({ baseURL: 'http://localhost:8080' - }) +}) -function Admin_supp(){ +function Admin_supp() { const location = useLocation(); const { iduser } = location.state; @@ -19,7 +19,7 @@ function Admin_supp(){ const navigate = useNavigate(); - useEffect(() =>{ + useEffect(() => { const apiString = '/User/Id/' + iduser; api.get(apiString).then((response) => { console.log(response.data[0]); @@ -27,8 +27,8 @@ function Admin_supp(){ }); }, []); - function checkDelete(event){ - + function checkDelete(event) { + event.preventDefault(); const apiString = '/User/Delete/' + iduser; @@ -50,11 +50,11 @@ function Admin_supp(){ - Nom - Prénom - Identifiant - Téléphone - Email + Nom + Prénom + Identifiant + Téléphone + Email @@ -68,13 +68,13 @@ function Admin_supp(){
-
-
- - Retour +
+ + Retour +
-
+
); }; diff --git a/src/styles/components/_admin.scss b/src/styles/components/_admin.scss index 1378a24..a110497 100644 --- a/src/styles/components/_admin.scss +++ b/src/styles/components/_admin.scss @@ -1,10 +1,10 @@ -.dark{ +.dark { background-color: $xiketic; color: white; } body { - + .page_admin { display: flex; flex-direction: row; @@ -48,21 +48,21 @@ body { text-decoration: none; align-self: center; } - + .modify_user { display: flex; padding: 5px; text-decoration: none; align-self: center; } - + .delete_user { display: flex; padding: 5px; text-decoration: none; align-self: center; } - + .list_devis { display: flex; padding: 5px; @@ -109,12 +109,12 @@ body { } } - .Titre_Formulaire{ + .Titre_Formulaire { display: flex; flex-direction: column; - margin: 10px 10px 10px 0px; + margin: 10px; padding: 10px; - flex-basis: 100%; + width: 100%; background: rgba(255, 255, 255, 0.3); border-radius: 15px; box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); @@ -123,11 +123,6 @@ body { .Titre { display: flex; - /*background: rgba(255, 255, 255, 0.3); - border-radius: 15px; - box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); - backdrop-filter: blur(3px); - -webkit-backdrop-filter: blur(15px);*/ margin: 10px; font-size: 70px; font-weight: bold; @@ -135,78 +130,131 @@ body { .Sous-titre { display: flex; - /*background: rgba(255, 255, 255, 0.3); - border-radius: 15px; - box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); - backdrop-filter: blur(3px); - -webkit-backdrop-filter: blur(15px);*/ margin: 10px; font-size: 40px; font-weight: bold; } - - .Formulaire{ + + .Formulaire { display: flex; - flex-direction: column; - align-items: center; - /*background: rgba(255, 255, 255, 0.3); - border-radius: 15px; - box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); - backdrop-filter: blur(3px); - -webkit-backdrop-filter: blur(15px);*/ + flex-direction: row; + justify-content: center; margin-left: 10px; margin-right: 10px; - .form{ + .form { display: flex; flex-direction: column; - align-self: center; + margin-top: 60px; font-size: 30px; + width: 80%; .Formulaire_de_connexion { - display: flex; flex-direction: row; - margin-top: 5%; - /*background: rgba(255, 255, 255, 0.3); - border-radius: 15px; - box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); - backdrop-filter: blur(3px); - -webkit-backdrop-filter: blur(15px);*/ - - .texte_côté { - display:flex; + justify-content: space-between; + + + .one { + display: flex; flex-direction: column; - justify-content: space-around; - height: 100%; + width: 24%; + + .texte_côté { + display: flex; + flex-direction: column; + justify-content: space-around; + margin-left: 80px; + height: 85%; + } + + } + + .one-2 { + display: flex; + flex-direction: column; + width: 60%; + + .texte_côté { + display: flex; + flex-direction: column; + justify-content: space-around; + margin-left: 150px; + height: 100%; + } + } - + + .two { + display: flex; + flex-direction: column; + width: 46%; + } + + .two-2 { + display: flex; + flex-direction: column; + width: 46%; + } + + .three { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + margin-top: 316px; + width: 29%; + font-size: 23px; + bottom: auto; + + .button_submit { + display: flex; + background-color: grey; + border: 1px solid rgba(255, 255, 255, 0.1); + backdrop-filter: blur(30px); + color: rgb(255, 255, 255); + cursor: pointer; + font-size: 25px; + border-radius: 15px; + width: 308px; + text-decoration: none; + + &:hover { + box-shadow: 0, 5px, 35px, 0 rgba(0, 0, 0, 1); + color: white; + background-color: rgba(114, 114, 114, 0.371); + } + + &:active { + background-color: rgba(68, 68, 68, 0.972); + } + } + } + input { display: flex; flex-direction: column; - margin: 10px; } - + .button_submit { display: flex; - margin-top: 150%; margin-bottom: 2%; padding-left: 10px; - - .bouton_réini{ - background-color: rgb(190, 189, 189); - border-radius: 5px; - border: 1px solid black; - box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); - cursor: pointer; + + .bouton_réini { + background-color: rgb(190, 189, 189); + border-radius: 5px; + border: 1px solid black; + box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); + cursor: pointer; } } } } } - + .texte { align-self: center; @@ -215,7 +263,7 @@ body { } .texte_zone { - width: 600px; + width: 599px; height: 50px; background-color: transparent; border-radius: 5px; @@ -235,7 +283,7 @@ body { height: 30px; margin-top: 5%; - .bouton_val{ + .bouton_val { display: flex; flex-direction: column; justify-content: center; @@ -259,7 +307,7 @@ body { } } - .bouton_ann{ + .bouton_ann { display: flex; flex-direction: column; justify-content: center; @@ -276,7 +324,7 @@ body { color: white; background-color: rgba(114, 114, 114, 0.371); } - + &:active { background-color: rgba(68, 68, 68, 0.972); } @@ -284,7 +332,7 @@ body { } } - .Titre_Formulaire_Rech{ + .Titre_Formulaire_Rech { display: flex; flex-direction: column; margin: 10px 10px 10px 0px; @@ -298,11 +346,6 @@ body { .Titre { display: flex; - /*background: rgba(255, 255, 255, 0.3); - border-radius: 15px; - box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); - backdrop-filter: blur(3px); - -webkit-backdrop-filter: blur(15px);*/ margin: 10px; font-size: 70px; font-weight: bold; @@ -310,11 +353,6 @@ body { .Sous-titre { display: flex; - /*background: rgba(255, 255, 255, 0.3); - border-radius: 15px; - box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); - backdrop-filter: blur(3px); - -webkit-backdrop-filter: blur(15px);*/ margin: 10px; font-size: 40px; font-weight: bold; @@ -323,14 +361,7 @@ body { .rechLogo { display: flex; flex-direction: column; - flex-basis: 100%; - /*background: rgba(255, 255, 255, 0.3); - border-radius: 15px; - box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); - backdrop-filter: blur(3px); - -webkit-backdrop-filter: blur(15px);*/ - //margin: 10px; - //padding: 10px; + height: 50%; align-items: center; margin-top: 5%; @@ -342,7 +373,6 @@ body { height: 40px; max-width: 350px; width: 100%; - //margin: 30px 30px; border-radius: 25px; box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); @@ -376,17 +406,69 @@ body { } } } + + .bouton_submit { + display: flex; + flex-direction: row; + justify-content: space-around; + align-self: center; + width: 600px; + height: 30px; + margin-top: 5%; + + .bouton_val { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + width: 150px; + height: 40px; + font-size: 20px; + text-decoration: none; + color: white; + background-color: grey; + border-radius: 15px; + border: 0; + + &:hover { + color: white; + background-color: rgba(114, 114, 114, 0.371); + } + + &:active { + background-color: rgba(68, 68, 68, 0.972); + } + } + + .bouton_ann { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + width: 150px; + height: 40px; + font-size: 20px; + text-decoration: none; + color: white; + background-color: grey; + border-radius: 15px; + + &:hover { + color: white; + background-color: rgba(114, 114, 114, 0.371); + } + + &:active { + background-color: rgba(68, 68, 68, 0.972); + } + } + } } .formulaire { display: flex; flex-direction: column; flex-basis: 100%; - /*background: rgba(255, 255, 255, 0.3); - border-radius: 15px; - box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); - backdrop-filter: blur(3px); - -webkit-backdrop-filter: blur(15px);*/ .bouton_personnes { display: flex; @@ -394,10 +476,7 @@ body { justify-content: space-between; width: 350px; margin: 20px 0 0 0; - /*background: rgba(255, 255, 255, 0.3); - box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); - backdrop-filter: blur(3px); - -webkit-backdrop-filter: blur(15px);*/ + } .bouton_submit { @@ -406,7 +485,7 @@ body { justify-content: space-between; padding: 30px 0 0 0; - .bouton_sup{ + .bouton_sup { display: flex; background-color: grey; border: 1px solid rgba(255, 255, 255, 0.1); @@ -418,36 +497,13 @@ body { width: 30%; align-items: center; justify-content: center; - - &:hover { - box-shadow: 0, 5px, 35px, 0 rgba(0, 0, 0, 1); - color: white; - background-color: rgba(114, 114, 114, 0.371); - } - - &:active { - background-color: rgba(68, 68, 68, 0.972); - } - } - .bouton_ann{ - display: flex; - background-color: grey; - border: 1px solid rgba(255, 255, 255, 0.1); - backdrop-filter: blur(30px); - color: rgb(255, 255, 255); - cursor: pointer; - font-size: 15px; - border-radius: 15px; - width: 30%; - align-items: center; - &:hover { box-shadow: 0, 5px, 35px, 0 rgba(0, 0, 0, 1); color: white; background-color: rgba(114, 114, 114, 0.371); } - + &:active { background-color: rgba(68, 68, 68, 0.972); } @@ -477,7 +533,7 @@ body { color: white; background-color: rgba(114, 114, 114, 0.371); } - + &:active { background-color: rgba(68, 68, 68, 0.972); } @@ -500,7 +556,7 @@ body { color: white; background-color: rgba(114, 114, 114, 0.371); } - + &:active { background-color: rgba(68, 68, 68, 0.972); } From 4fd1c747eadad9f8c879ddb72d93ca9bfee372d7 Mon Sep 17 00:00:00 2001 From: clverdoire Date: Fri, 9 Dec 2022 12:21:46 +0100 Subject: [PATCH 16/30] correction de mon dernier commit --- src/styles/components/_admin.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/components/_admin.scss b/src/styles/components/_admin.scss index a110497..03d970b 100644 --- a/src/styles/components/_admin.scss +++ b/src/styles/components/_admin.scss @@ -263,7 +263,7 @@ body { } .texte_zone { - width: 599px; + width: 550px; height: 50px; background-color: transparent; border-radius: 5px; From 9f7a57a2dba99b8c39967c7f3392ce3786adf98e Mon Sep 17 00:00:00 2001 From: Maxence Lanone Date: Fri, 9 Dec 2022 14:07:47 +0100 Subject: [PATCH 17/30] fichier vscode --- .vscode/c_cpp_properties.json | 18 ++++++++++++++++++ .vscode/launch.json | 13 +++++++++++++ .vscode/settings.json | 36 +++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..980fd57 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,18 @@ +{ + "configurations": [ + { + "name": "macos-clang-arm64", + "includePath": [ + "${workspaceFolder}/**" + ], + "compilerPath": "/usr/bin/clang", + "cStandard": "${default}", + "cppStandard": "${default}", + "intelliSenseMode": "macos-clang-arm64", + "compilerArgs": [ + "" + ] + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..6053dbd --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,13 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "C/C++ Runner: Debug Session", + "type": "lldb", + "request": "launch", + "args": [], + "cwd": "/Users/malanone/JTT_Production/JTT_CrM", + "program": "/Users/malanone/JTT_Production/JTT_CrM/build/Debug/outDebug" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..50d1b0f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,36 @@ +{ + "C_Cpp_Runner.cCompilerPath": "clang", + "C_Cpp_Runner.cppCompilerPath": "clang++", + "C_Cpp_Runner.debuggerPath": "lldb", + "C_Cpp_Runner.cStandard": "", + "C_Cpp_Runner.cppStandard": "", + "C_Cpp_Runner.msvcBatchPath": "", + "C_Cpp_Runner.useMsvc": false, + "C_Cpp_Runner.warnings": [ + "-Wall", + "-Wextra", + "-Wpedantic", + "-Wshadow", + "-Wformat=2", + "-Wconversion", + "-Wnull-dereference", + "-Wsign-conversion" + ], + "C_Cpp_Runner.enableWarnings": true, + "C_Cpp_Runner.warningsAsError": false, + "C_Cpp_Runner.compilerArgs": [], + "C_Cpp_Runner.linkerArgs": [], + "C_Cpp_Runner.includePaths": [], + "C_Cpp_Runner.includeSearch": [ + "*", + "**/*" + ], + "C_Cpp_Runner.excludeSearch": [ + "**/build", + "**/build/**", + "**/.*", + "**/.*/**", + "**/.vscode", + "**/.vscode/**" + ] +} \ No newline at end of file From 08e192d5bacfd2c77abcc9aa381ee66c08523301 Mon Sep 17 00:00:00 2001 From: Maxence Lanone Date: Fri, 9 Dec 2022 20:55:28 +0100 Subject: [PATCH 18/30] reglage add contact --- server-api/1 | 1 - server-api/api.js | 6 +++--- server-api/kill | 1 - src/components/Contact/AddContact.js | 19 ++++++++++++------- src/components/Menu.js | 11 ----------- src/pages/Calendrier.js | 1 + src/pages/Repertoire.js | 7 +++++-- src/styles/components/_repertoire.scss | 23 +++++++++-------------- 8 files changed, 30 insertions(+), 39 deletions(-) delete mode 100644 server-api/1 delete mode 100644 server-api/kill delete mode 100644 src/components/Menu.js diff --git a/server-api/1 b/server-api/1 deleted file mode 100644 index 0a1c474..0000000 --- a/server-api/1 +++ /dev/null @@ -1 +0,0 @@ -703 diff --git a/server-api/api.js b/server-api/api.js index 8217b8a..d565404 100644 --- a/server-api/api.js +++ b/server-api/api.js @@ -312,9 +312,9 @@ app.post('/Contact/Add', (req, res) => { let form = req.body; - console.log(form); + console.log("on est dans le form",form); - const sql = `INSERT INTO contact(name, firstname, mail, phone, idUser, idCustomer) VALUES ('${form.name}', '${form.firstname}', '${form.mail}', '${form.phone}' , '${form.idrole}', '${form.idUser}', '${form.idCustomer}' )`; + const sql = `INSERT INTO contacts(firstname,lastname, mail, phone, iduser, idcustomer) VALUES ('${form.firstname}', '${form.lastname}', '${form.mail}', '${form.phone}', '${form.iduser}', '${form.idcustomer}' )`; db.query(sql , (err, result) => { if (err) throw err; console.log(result); @@ -338,7 +338,7 @@ app.post('/Event/Add', (req, res) => { let form = req.body; - console.log(form); + console.log("on est dans le form d'un event ",form); const sql = `INSERT INTO events(date,starttime,endtime,comment,idusersend,iduserreceive,idcontact) VALUES ('${form.date}', '${form.starttime}', '${form.endtime}', '${form.comment}', '${form.idusersend}', '${form.iduserreceive}', '${form.idcontact}')`; db.query(sql , (err, result) => { diff --git a/server-api/kill b/server-api/kill deleted file mode 100644 index 0a1c474..0000000 --- a/server-api/kill +++ /dev/null @@ -1 +0,0 @@ -703 diff --git a/src/components/Contact/AddContact.js b/src/components/Contact/AddContact.js index 1a2d794..8bf59aa 100644 --- a/src/components/Contact/AddContact.js +++ b/src/components/Contact/AddContact.js @@ -7,6 +7,7 @@ import MenuItem from '@mui/material/MenuItem'; import { NavLink } from 'react-router-dom'; import { useNavigate } from "react-router-dom"; import { Button } from '@mui/material'; +import Session from 'react-session-api'; // HERE ABOVE useHistory IS REPLACED WITH useNavigate const api = axios.create({ @@ -18,6 +19,7 @@ function AddContact() { const [loginError, setLoginError] = useState(false); const [entreprises, setEntreprises] = useState([]); const [selectedIdEntreprise, setSelectedIdEntreprise] = useState(1); + const [newContact, setNewContact] = useState([]); const navigate=useNavigate(); @@ -39,21 +41,24 @@ function AddContact() { const formData = new FormData(event.currentTarget); const values = Object.fromEntries(formData.entries()); - console.log(values.name); - api.get('/Contact/Exist/'+ values.idcontact).then((response) => { + setNewContact(values); + setNewContact(newContact => [...newContact, Session.get('idUser')]); + console.log("c'est le new contact " ,newContact); + api.get('/Contact/Exist/'+ values.phone).then((response) => { const login = response.data; if (login.length > 0){ setLoginError(true); } else { setLoginError(false); - - api.post('/Contact/Add', values).then (function(response) { + const newContact = [firstname:values.firstname, lastname:values.lastname, phone:values.phone, mail:values.email, iduser:Session.get('idUser'), idcustomer:values.selectedIdEntreprise]; + api.post('/Contact/Add', newContact).then (function(response) { console.log(response.data); }); + console.log("c'est le new contact " ,newContact); - navigate("/Repertoire"); } + navigate("/Repertoire"); }); }; @@ -73,8 +78,8 @@ function AddContact() {
- - + + diff --git a/src/components/Menu.js b/src/components/Menu.js deleted file mode 100644 index 7c04e13..0000000 --- a/src/components/Menu.js +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react'; - -const Menu = () => { - return ( -
- -
- ); -}; - -export default Menu; \ No newline at end of file diff --git a/src/pages/Calendrier.js b/src/pages/Calendrier.js index bef41d7..39ad63c 100644 --- a/src/pages/Calendrier.js +++ b/src/pages/Calendrier.js @@ -39,6 +39,7 @@ useEffect(() =>{ const apiString = '/Contact/' + Session.get("idUser"); api.get(apiString).then((response) => { setContacts(response.data); + console.log("response.data",response.data); setSelectedContact(response.data[0].idcontact) }); diff --git a/src/pages/Repertoire.js b/src/pages/Repertoire.js index 6e235a4..8d34aab 100644 --- a/src/pages/Repertoire.js +++ b/src/pages/Repertoire.js @@ -6,6 +6,7 @@ import { TableContainer, Table, TableHead, TableBody, TableRow, TableCell } from import { Paper } from '@mui/material'; import { NavLink } from 'react-router-dom'; import { useNavigate } from 'react-router-dom'; +import Session from 'react-session-api'; const api = axios.create({ baseURL: 'http://localhost:8080' @@ -23,10 +24,12 @@ function Repertoire() { const [SearchResults, setSearchResults] = useState([]); const [customers, setCustomers] = useState([]); - useEffect(() => { - api.get('/Contact/AllWithCustomerName').then((response) => { + const apiString = '/Contact/' + Session.get("idUser"); + api.get(apiString).then((response) => { + setContacts(response.data); + console.log("response.data", response.data); setSearchTerm(response.data[0].idcontact); }); }, []); diff --git a/src/styles/components/_repertoire.scss b/src/styles/components/_repertoire.scss index 6d4110f..0cc9050 100644 --- a/src/styles/components/_repertoire.scss +++ b/src/styles/components/_repertoire.scss @@ -171,24 +171,19 @@ body { width: 100%; justify-content: space-between; + + .boutonAddContact { display: flex; justify-content: center; align-items: center; - width: 100%; - justify-content: space-between; - - .boutonAddContact { - display: flex; - justify-content: center; - align-items: center; - height: 40px; - min-width: 150px; - margin: 30px 30px; - border-radius: 25px; - box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); - text-decoration-line: none; - } + height: 40px; + min-width: 150px; + margin: 30px 30px; + border-radius: 25px; + box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); + text-decoration-line: none; + } .input_box { display: flex; From 58a13c102d65320a1e1184dc7478e6edfd8299ae Mon Sep 17 00:00:00 2001 From: Jeremy DUCOURTHIAL Date: Fri, 9 Dec 2022 20:56:17 +0100 Subject: [PATCH 19/30] Select sur calendrier fonctionnel --- server-api/api.js | 2 +- src/pages/Analyse.js | 1 - src/pages/Calendrier.js | 37 +++++++++++++++++-------------------- 3 files changed, 18 insertions(+), 22 deletions(-) diff --git a/server-api/api.js b/server-api/api.js index da94fc8..f639d30 100644 --- a/server-api/api.js +++ b/server-api/api.js @@ -317,7 +317,7 @@ app.get('/Event/:iduser', (req, res) => { const iduser = req.params.iduser; - let sql = 'SELECT * FROM events e where e.iduserreceive = ?'; + let sql = 'SELECT e.date,e.starttime,e.endtime,e.comment FROM events e where e.iduserreceive = ?'; db.query(sql,[iduser], (err, result) => { if (err) throw err; diff --git a/src/pages/Analyse.js b/src/pages/Analyse.js index 2572fa5..1480ef5 100644 --- a/src/pages/Analyse.js +++ b/src/pages/Analyse.js @@ -132,7 +132,6 @@ const Analyse = () => { for(let i = 0; i < lineDatas.length; i++) { - console.log(lineDatas); dataH.labels[i] = lineDatas[i].month +"/" +lineDatas[i].year; dataH.datasets[0].data[i] = lineDatas[i].total; } diff --git a/src/pages/Calendrier.js b/src/pages/Calendrier.js index bef41d7..4134078 100644 --- a/src/pages/Calendrier.js +++ b/src/pages/Calendrier.js @@ -32,40 +32,37 @@ const localizer = dateFnsLocalizer({ function Calendrier(){ const [contacts, setContacts] = useState([]); - const [events, setEvents] = useState([]); const [selectedContact, setSelectedContact] = useState(1); + const [allEvents, setAllEvents] = useState([]); -useEffect(() =>{ - const apiString = '/Contact/' + Session.get("idUser"); - api.get(apiString).then((response) => { - setContacts(response.data); - setSelectedContact(response.data[0].idcontact) - }); - - const apiStringEvent = '/Event/' + Session.get("idUser"); - api.get(apiStringEvent).then((response) => { - setEvents(response.data); - }); + useEffect(() =>{ + const apiString = '/Contact/' + Session.get("idUser"); + api.get(apiString).then((response) => { + setContacts(response.data); + setSelectedContact(response.data[0].idcontact) + }); - events.forEach(event => { - const newEvent = { title: event.comment, start: new Date(event.date+" "+event.starttime), end: new Date(event.date+" "+event.endtime) }; - setAllEvents([...allEvents, newEvent]); - console.log("here"); - }); -}, []); + const apiStringEvent = '/Event/' + Session.get("idUser"); + api.get(apiStringEvent).then((response) => { + setAllEvents([]); + response.data.forEach(event => { + const newEvent = { title: event.comment, start: new Date(event.date+" "+event.starttime), end: new Date(event.date+" "+event.endtime) }; + setAllEvents(allEvents => [...allEvents, newEvent]); + }); + }); + }, []); const [theme, setTheme] = useState("light"); if (localStorage.getItem('theme') && localStorage.getItem("theme") !== '' && localStorage.getItem("theme") !== theme) { setTheme(localStorage.getItem("theme")) } + const [titre, setTitre] = useState(""); const [jour , setJour] = useState(new Date()); const [heureDebut, setHeureDebut] = useState(new Date()); const [heureFin, setHeureFin] = useState(new Date()); - const [allEvents, setAllEvents] = useState(events); - function handleAddEvent() { const newEvent = { title: titre, start: new Date(jour+" "+heureDebut), end: new Date(jour+" "+heureFin) }; const newEventBD = { date: jour,starttime: heureDebut,endtime: heureFin,comment: titre, idusersend: Session.get("idUser"),iduserreceive: Session.get("idUser"), idcontact: selectedContact}; From a031f86e11a22b3094680b903762edcc4da0a6c8 Mon Sep 17 00:00:00 2001 From: Maxence Lanone Date: Fri, 9 Dec 2022 21:29:34 +0100 Subject: [PATCH 20/30] ajout contact OK --- src/components/Contact/AddContact.js | 97 +++++++++++++--------------- 1 file changed, 46 insertions(+), 51 deletions(-) diff --git a/src/components/Contact/AddContact.js b/src/components/Contact/AddContact.js index 8bf59aa..156e9ae 100644 --- a/src/components/Contact/AddContact.js +++ b/src/components/Contact/AddContact.js @@ -12,89 +12,84 @@ import Session from 'react-session-api'; const api = axios.create({ baseURL: 'http://localhost:8080' - }) +}) function AddContact() { - const [loginError, setLoginError] = useState(false); + const [loginError, setLoginError] = useState(false); const [entreprises, setEntreprises] = useState([]); const [selectedIdEntreprise, setSelectedIdEntreprise] = useState(1); - const [newContact, setNewContact] = useState([]); - - const navigate=useNavigate(); - - useEffect(() =>{ + const navigate = useNavigate(); + + useEffect(() => { api.get('/Entreprise/All').then((response) => { setEntreprises(response.data); - console.log(entreprises); }); }, []); - function handleChangeEntreprise(event){ + function handleChangeEntreprise(event) { setSelectedIdEntreprise(event.target.value); console.log("je suis dans handleChangeEntreprise"); }; - function checkAdd(event){ - + function checkAdd(event) { + event.preventDefault(); const formData = new FormData(event.currentTarget); const values = Object.fromEntries(formData.entries()); - setNewContact(values); - setNewContact(newContact => [...newContact, Session.get('idUser')]); - console.log("c'est le new contact " ,newContact); - api.get('/Contact/Exist/'+ values.phone).then((response) => { + api.get('/Contact/Exist/' + values.phone).then((response) => { const login = response.data; - if (login.length > 0){ + if (login.length > 0) { setLoginError(true); } else { setLoginError(false); - const newContact = [firstname:values.firstname, lastname:values.lastname, phone:values.phone, mail:values.email, iduser:Session.get('idUser'), idcustomer:values.selectedIdEntreprise]; - api.post('/Contact/Add', newContact).then (function(response) { + const newContact = { firstname: values.firstname, lastname: values.lastname, phone: values.phone, mail: values.mail, iduser: Session.get('idUser'), idcustomer: selectedIdEntreprise }; + api.post('/Contact/Add', newContact).then(function (response) { console.log(response.data); }); - console.log("c'est le new contact " ,newContact); - + navigate("/Repertoire"); } - navigate("/Repertoire"); + }); + }; - + + return (

Ajouter un nouveau contact

- - - -
-

Nom :

-

Prénom :

-

Téléphone :

-

Email :

-

Entreprise :

-
- - - - - - - - -
-

{loginError === true?"L'identifiant existe déja":''}

-
- - Retour -
- -
+
+ + +
+

Nom :

+

Prénom :

+

Téléphone :

+

Email :

+

Entreprise :

+
+ + + + + + + + +
+

{loginError === true ? "Le contact existe déja" : ''}

+
+ + Retour +
+
+
) } From 43f441013dc84a40689ec7e351b96800c5061464 Mon Sep 17 00:00:00 2001 From: clverdoire Date: Sun, 11 Dec 2022 21:50:56 +0100 Subject: [PATCH 21/30] changement bouton page parametre --- src/pages/Parametres.js | 4 +- src/styles/components/_calendrier.scss | 4 +- src/styles/components/_parametre.scss | 80 ++++++++++++++------------ src/styles/components/_repertoire.scss | 2 +- 4 files changed, 47 insertions(+), 43 deletions(-) diff --git a/src/pages/Parametres.js b/src/pages/Parametres.js index cc82880..12a6e59 100644 --- a/src/pages/Parametres.js +++ b/src/pages/Parametres.js @@ -32,7 +32,7 @@ const Parametre = () => {
- sécurité +

Sécurité

Signaler un problème

@@ -49,7 +49,7 @@ const Parametre = () => {
- Général +

Général

Mode sombre

diff --git a/src/styles/components/_calendrier.scss b/src/styles/components/_calendrier.scss index 8ba5b94..bd00b20 100644 --- a/src/styles/components/_calendrier.scss +++ b/src/styles/components/_calendrier.scss @@ -1,5 +1,3 @@ - - body { .page_calendrier { @@ -48,7 +46,7 @@ body { flex-direction: row; justify-content: space-between; width: auto; - height: 86%; + height: 84%; .nav_bar_verticale { display: flex; diff --git a/src/styles/components/_parametre.scss b/src/styles/components/_parametre.scss index bb7880e..6c99566 100644 --- a/src/styles/components/_parametre.scss +++ b/src/styles/components/_parametre.scss @@ -8,7 +8,7 @@ body { justify-content: space-evenly; width: auto; height: 100vh; - + .haut_de_page { display: flex; flex-direction: row; @@ -18,7 +18,7 @@ body { height: 10%; align-items: center; margin: 10px 10px 5px 10px; - + background: rgba(255, 255, 255, 0.3); border-radius: 15px; box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25); @@ -28,7 +28,7 @@ body { .titre { font-size: 40px; } - + .rechLogo { display: flex; flex-direction: row; @@ -40,16 +40,16 @@ body { width: 100px; height: 100px; } - } + } } - + .bas_de_page { display: flex; flex-direction: row; justify-content: space-between; width: auto; height: 86%; - + .nav_bar_verticale { display: flex; flex-direction: column; @@ -108,7 +108,7 @@ body { border: none; cursor: pointer; - .logo_nav_bar{ + .logo_nav_bar { display: flex; margin: 10px; height: 50px; @@ -116,7 +116,7 @@ body { } } } - + .Parametre { display: flex; flex-direction: column; @@ -145,6 +145,11 @@ body { justify-content: space-between; height: 50%; border-bottom: 1px solid black; + + .text_one_haut { + font-size: 20px; + font-weight: 700; + } } .one_milieu { @@ -161,21 +166,19 @@ body { .bouton_submit { display: flex; - margin-left: 30px; align-items: center; cursor: pointer; .bouton_signalerPB { - width: 75px; - height: 20px; + width: 110px; + height: 25px; background-color: rgb(190, 189, 189); - border-radius: 5px; - border-radius: 5px; + border-radius: 20px; box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25); cursor: pointer; - - &:hover{ - background-color: lightgrey; + + &:hover { + background-color: lightgrey; } } } @@ -194,22 +197,20 @@ body { .bouton_submit { display: flex; - margin-left: 30px; align-items: center; text-decoration: none; cursor: pointer; .bouton_modifierMDP { - width: 75px; - height: 20px; + width: 110px; + height: 25px; background-color: rgb(190, 189, 189); - border-radius: 5px; - border-radius: 5px; + border-radius: 20px; box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25); cursor: pointer; - - &:hover{ - background-color: lightgrey; + + &:hover { + background-color: lightgrey; } } } @@ -233,8 +234,12 @@ body { .two_haut { display: flex; height: 75%; - border-bottom: 1px solid black; + + .text_two_haut { + font-size: 20px; + font-weight: 700; + } } .two_bas { @@ -246,8 +251,8 @@ body { .center { position: absolute; top: 84%; - right: 0.5%; - transform: translate(-50%,-50%); + right: 2%; + transform: translate(-50%, -50%); input[type="checkbox"] { position: relative; @@ -257,7 +262,7 @@ body { background-color: #e2e2e2; outline: none; border-radius: 20px; - box-shadow: inset 0 0 5px rgba(0,0,0,.5); + box-shadow: inset 0 0 5px rgba(0, 0, 0, .5); transition: .5s; cursor: pointer; } @@ -276,7 +281,7 @@ body { left: 10%; background-color: white; transform: scale(1.1); - box-shadow: 0 2px 5px rgba(0,0,0,.2); + box-shadow: 0 2px 5px rgba(0, 0, 0, .2); transition: .5s; } @@ -302,6 +307,8 @@ body { .text_three_haut { display: flex; + font-size: 20px; + font-weight: 700; margin: 10px; } @@ -312,7 +319,7 @@ body { margin-left: 10px; margin-right: 10px; padding: 10px; - + border-top: 1px solid black; .text_three { @@ -320,16 +327,15 @@ body { } .bouton { - width: 100px; - height: 20px; + width: 110px; + height: 25px; background-color: rgb(190, 189, 189); - border-radius: 5px; - border-radius: 5px; + border-radius: 20px; box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25); cursor: pointer; - &:hover{ - background-color: lightgrey; + &:hover { + background-color: lightgrey; } } } @@ -337,4 +343,4 @@ body { } } } -} +} \ No newline at end of file diff --git a/src/styles/components/_repertoire.scss b/src/styles/components/_repertoire.scss index 8ef8b6f..78846ac 100644 --- a/src/styles/components/_repertoire.scss +++ b/src/styles/components/_repertoire.scss @@ -88,7 +88,7 @@ body { flex-direction: row; justify-content: space-between; width: auto; - height: 86%; + height: 84%; .nav_bar_verticale { display: flex; From eb465a81ffd3a398e7b520e89c7a5a5e77b07b3a Mon Sep 17 00:00:00 2001 From: Tristan Barlet Date: Wed, 14 Dec 2022 11:21:55 +0100 Subject: [PATCH 22/30] mise en place mail pour avertir admin (dans server : npm i nodemailer) --- server-api/api.js | 36 ++++ server-api/package-lock.json | 14 ++ server-api/package.json | 1 + src/App.js | 2 + src/pages/MailPourAdmin.js | 99 +++++++++++ src/pages/Parametres.js | 4 +- src/styles/components/_mailPourAdmin.scss | 201 ++++++++++++++++++++++ src/styles/index.scss | 3 +- 8 files changed, 358 insertions(+), 2 deletions(-) create mode 100644 src/pages/MailPourAdmin.js create mode 100644 src/styles/components/_mailPourAdmin.scss diff --git a/server-api/api.js b/server-api/api.js index b0292a5..a6d8d6a 100644 --- a/server-api/api.js +++ b/server-api/api.js @@ -3,6 +3,19 @@ const express = require('express'); const cors=require("cors"); const bodyparser = require('body-parser'); +const nodemailer = require('nodemailer'); + +// Créer un transporteur de mail +let transporter = nodemailer.createTransport({ + host: 'smtp.gmail.com', + port: 587, +// secure: true, // utiliser SSL + auth: { + user: 'stageodinnonoffi@gmail.com', + pass: 'pjjlofjkpnfpwkiz' + } +}); + const db = mysql.createConnection({ host: 'lfbn-cle-1-568-58.w92-157.abo.wanadoo.fr', user: 'crmuser', @@ -360,4 +373,27 @@ app.get('/Event/:iduser', (req, res) => { console.log(result); res.send(result); }); +}); + +app.post('/Mail/Avertir', (req, res) => { + // Définir les options du mail + let form = req.body; + console.log(form) + let mailOptions = { + from: '"JTT CRM" ', + to: 'Jeremy.DUCOURTHIALE@etu.uca.fr', + subject: form.objet, + text: form.raison + }; + + transporter.sendMail(mailOptions, (error, info) => { + if (error) { + console.log(error); + res.send(false) + } else { + console.log('Email sent: ' + info.response); + res.send(true) + } + }); + }); \ No newline at end of file diff --git a/server-api/package-lock.json b/server-api/package-lock.json index 478c9e4..e202ab0 100644 --- a/server-api/package-lock.json +++ b/server-api/package-lock.json @@ -21,6 +21,7 @@ "fullcalendar": "^5.11.3", "googleapis": "^105.0.0", "mysql": "^2.18.1", + "nodemailer": "^6.8.0", "parser": "^0.1.4" }, "devDependencies": { @@ -2286,6 +2287,14 @@ "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", "peer": true }, + "node_modules/nodemailer": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.8.0.tgz", + "integrity": "sha512-EjYvSmHzekz6VNkNd12aUqAco+bOkRe3Of5jVhltqKhEsjw/y0PYPJfp83+s9Wzh1dspYAkUW/YNQ350NATbSQ==", + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/nodemon": { "version": "2.0.20", "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.20.tgz", @@ -4636,6 +4645,11 @@ "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", "peer": true }, + "nodemailer": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.8.0.tgz", + "integrity": "sha512-EjYvSmHzekz6VNkNd12aUqAco+bOkRe3Of5jVhltqKhEsjw/y0PYPJfp83+s9Wzh1dspYAkUW/YNQ350NATbSQ==" + }, "nodemon": { "version": "2.0.20", "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.20.tgz", diff --git a/server-api/package.json b/server-api/package.json index eb95c4f..94e8247 100644 --- a/server-api/package.json +++ b/server-api/package.json @@ -21,6 +21,7 @@ "fullcalendar": "^5.11.3", "googleapis": "^105.0.0", "mysql": "^2.18.1", + "nodemailer": "^6.8.0", "parser": "^0.1.4" }, "description": "", diff --git a/src/App.js b/src/App.js index d84a7b5..f47d42c 100644 --- a/src/App.js +++ b/src/App.js @@ -13,6 +13,7 @@ import Calendrier from './pages/Calendrier'; import Repertoire from './pages/Repertoire'; import Parametres from './pages/Parametres'; import Chargement from './pages/Chargement'; +import MailPourAdmin from './pages/MailPourAdmin'; import AddContact from './components/Contact/AddContact' import { Component } from 'fullcalendar'; import RestartPassword from './pages/RestartPassword'; @@ -41,6 +42,7 @@ const App = () => { } /> } /> } /> + } /> } /> diff --git a/src/pages/MailPourAdmin.js b/src/pages/MailPourAdmin.js new file mode 100644 index 0000000..c44542e --- /dev/null +++ b/src/pages/MailPourAdmin.js @@ -0,0 +1,99 @@ +import React, {useState} from 'react'; +import NavigationDashboard from '../components/NavigationDashboard'; +import axios from 'axios'; +import Session from 'react-session-api'; +import { useNavigate } from 'react-router-dom'; + +const api = axios.create({ + baseURL: 'http://localhost:8080' + }) + +const MailPourAdmin = () => { + const [mailError, setMailError] = useState(false); + const [objetError, setObjetError] = useState(false); + const [descriptionError, setDescriptionError] = useState(false); + const [theme, setTheme] = useState("light"); + const navigate = useNavigate(); + + if (localStorage.getItem('theme') && localStorage.getItem("theme") !== '' && localStorage.getItem("theme") !== theme) { + setTheme(localStorage.getItem("theme")) + } + + function sendMail(e) { + e.preventDefault(); + + const formData = new FormData(e.currentTarget); + const values = Object.fromEntries(formData.entries()); + + console.log(values); + if (values.objet === '') { + setObjetError(true) + } else { + setObjetError(false) + } + if (values.raison === '') { + setDescriptionError(true) + } else { + setDescriptionError(false) + } + if (values.objet === '' || values.raison === '') { + return + } + values.objet = values.objet + "[user id : " + Session.get("idUser") + "]" + + + api.post('/Mail/Avertir',values).then (function(response) { + if (response.data) { + navigate('/dashboard') + } + else { + setMailError(true) + // e.reset(); + } + }); + + + } + + return ( + + + + +
+
+

Avertir un administrateur

+
+ +
+
+
+ +
+
+
+

Objet

+ +
+
+

Raison

+