ajout nom entreprise liste client + opti css dark theme

master
Maxence LANONE 3 years ago
parent 4406df563e
commit 0553f6df03

@ -165,8 +165,8 @@ app.put('/User/Update/:id', (req, res) => {
//Api pour les contacts de la page repertoire //Api pour les contacts de la page repertoire
app.get('/Contact/All', (req, res) => { app.get('/Contact/AllWithCustomerName', (req, res) => {
let sql = 'SELECT * FROM contacts ORDER BY idcontact'; let sql = 'SELECT c.*, cu.name FROM contacts c, customers cu WHERE cu.idCustomer = c.idCustomer ORDER BY idcontact';
db.query(sql, (err, result) => { db.query(sql, (err, result) => {
if (err) throw err; if (err) throw err;
console.log(result); console.log(result);

@ -21,9 +21,10 @@ function Repertoire() {
const [SearchTerm, setSearchTerm] = useState(""); const [SearchTerm, setSearchTerm] = useState("");
const [SearchResults, setSearchResults] = useState([]); const [SearchResults, setSearchResults] = useState([]);
const [customers, setCustomers] = useState([]); const [customers, setCustomers] = useState([]);
useEffect(() => { useEffect(() => {
api.get('/Contact/All').then((response) => { api.get('/Contact/AllWithCustomerName').then((response) => {
setContacts(response.data); setContacts(response.data);
setSearchTerm(response.data[0].idcontact); setSearchTerm(response.data[0].idcontact);
}); });
@ -70,7 +71,7 @@ function Repertoire() {
<TableCell>Photo</TableCell> <TableCell>Photo</TableCell>
<TableCell>Nom</TableCell> <TableCell>Nom</TableCell>
<TableCell>Prénom</TableCell> <TableCell>Prénom</TableCell>
<TableCell>Entreprise</TableCell>
</TableRow> </TableRow>
</TableHead> </TableHead>
<TableBody> <TableBody>
@ -79,6 +80,7 @@ function Repertoire() {
<TableCell><img className="photoContact" src={user} /></TableCell> <TableCell><img className="photoContact" src={user} /></TableCell>
<TableCell>{contact.lastname}</TableCell> <TableCell>{contact.lastname}</TableCell>
<TableCell>{contact.firstname}</TableCell> <TableCell>{contact.firstname}</TableCell>
<TableCell>{contact.name}</TableCell>
</TableRow> </TableRow>
))} ))}
</TableBody> </TableBody>

@ -1,7 +1,4 @@
.dark{
background-color: $xiketic;
color: white;
}
body { body {

@ -1,7 +1,4 @@
.dark{
background-color: $xiketic;
color: white;
}
body { body {

@ -1,7 +1,4 @@
.dark{
background-color: $xiketic;
color: white;
}
body { body {

@ -1,7 +1,3 @@
.dark{
background-color: $xiketic;
color: white;
}
body { body {
.page_connexion { .page_connexion {

@ -1,7 +1,4 @@
.dark{
background-color: $xiketic;
color: white;
}
body { body {
.page_dashboard { .page_dashboard {

@ -1,8 +1,3 @@
.dark{
background-color: $xiketic;
color: white;
}
body { body {
background-color: $alice-blue; background-color: $alice-blue;
color: black; color: black;

@ -14,19 +14,7 @@ $rufous: #9b2915ff;
$xiketic: #020114ff; $xiketic: #020114ff;
$beau-blue: #b1c5d2; $beau-blue: #b1c5d2;
/* SCSS HSL */
$alice-blue: hsla(204, 28%, 93%, 1);
$blue-munsell: hsla(190, 100%, 32%, 1);
$malachite: hsla(142, 80%, 55%, 1);
$rufous: hsla(9, 76%, 35%, 1);
$xiketic: hsla(243, 90%, 4%, 1);
/* SCSS RGB */
$alice-blue: rgba(232, 238, 242, 1);
$blue-munsell: rgba(0, 136, 163, 1);
$malachite: rgba(50, 232, 117, 1);
$rufous: rgba(155, 41, 21, 1);
$xiketic: rgb(21, 18, 75);
/* SCSS Gradient */ /* SCSS Gradient */
$gradient-top: linear-gradient(0deg, #e8eef2ff, #0088a3ff, #32e875ff, #9b2915ff, #020114ff); $gradient-top: linear-gradient(0deg, #e8eef2ff, #0088a3ff, #32e875ff, #9b2915ff, #020114ff);
@ -59,4 +47,9 @@ body {
li { li {
list-style-type: none; list-style-type: none;
}
.dark{
background-color: $xiketic;
color: white;
} }
Loading…
Cancel
Save