add register and see panel
Deploy Nexus Portal to HestiaCP (FTP) / build-and-deploy (push) Successful in 30s
Deploy Nexus Portal to HestiaCP (FTP) / build-and-deploy (push) Successful in 30s
This commit is contained in:
@@ -13,11 +13,31 @@ export default function Dashboard() {
|
||||
useEffect(() => {
|
||||
const fetchInventory = async () => {
|
||||
try {
|
||||
// Appel à FOSSBilling via notre api.js
|
||||
const data = await getClientOrders();
|
||||
|
||||
// FOSSBilling renvoie souvent la liste dans data.list
|
||||
setOrders(data.list || []);
|
||||
if (data.list) {
|
||||
// LE FILTRE CHIRURGICAL PAR PREFIXE
|
||||
const filteredOrders = data.list.filter(order => {
|
||||
const title = (order.title || '').toLowerCase();
|
||||
const type = (order.type || '').toLowerCase();
|
||||
|
||||
// On masque la commande SI :
|
||||
// 1. Le type technique est "domain"
|
||||
// 2. OU le titre COMMENCE par "domain", "domaine" ou "enregistrement"
|
||||
const isGhostProduct =
|
||||
type === 'domain' ||
|
||||
title.startsWith('domain ') ||
|
||||
title.startsWith('domaine ') ||
|
||||
title.startsWith('enregistrement ');
|
||||
|
||||
// On retourne true (on affiche) uniquement si ce n'est pas un produit fantôme
|
||||
return !isGhostProduct;
|
||||
});
|
||||
|
||||
setOrders(filteredOrders);
|
||||
} else {
|
||||
setOrders([]);
|
||||
}
|
||||
} catch (err) {
|
||||
setError(err.message || "Impossible de récupérer la télémétrie des services.");
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user