ajout sécurité

master
Jeremy DUCOURTHIAL 2 years ago
parent b05a087af6
commit 3da65f0434

@ -28,12 +28,24 @@ function Dashboard(){
const apiString = '/Contact/LastAdd3/' + Session.get("idUser"); const apiString = '/Contact/LastAdd3/' + Session.get("idUser");
api.get(apiString).then((response) => { api.get(apiString).then((response) => {
setInfoContactRecent(response.data); const data = response.data;
if (data.length > 0){
setInfoContactRecent(response.data[0]);
}
else{
setInfoContactRecent("");
}
}); });
const apiStringKey = '/Sale/KeyNumber/' + Session.get("idUser") + "/" + month + "/" + year; const apiStringKey = '/Sale/KeyNumber/' + Session.get("idUser") + "/" + month + "/" + year;
api.get(apiStringKey).then((response) => { api.get(apiStringKey).then((response) => {
setDataKey(response.data[0]); const data = response.data;
if (data.length > 0){
setDataKey(response.data[0]);
}
else{
setDataKey("");
}
}); });
const apiStringBestCustomer = '/Sale/BestCustomer/' + Session.get("idUser"); const apiStringBestCustomer = '/Sale/BestCustomer/' + Session.get("idUser");

@ -11,7 +11,7 @@ $alice-blue: #e8eef2ff;
$blue-munsell: #0088a3ff; $blue-munsell: #0088a3ff;
$malachite: #32e875ff; $malachite: #32e875ff;
$rufous: #9b2915ff; $rufous: #9b2915ff;
$xiketic: #020114ff; $xiketic: #020114;
$beau-blue: #b1c5d2; $beau-blue: #b1c5d2;

Loading…
Cancel
Save