diff --git a/src/App.jsx b/src/App.jsx
index c982aca..7a6413c 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -20,6 +20,7 @@ import Store from './pages/app/Store';
import Checkout from './pages/app/Checkout';
import Services from './pages/app/Services';
import Support from './pages/app/Support';
+import BillingHistory from './pages/app/BillingHistory';
export default function App() {
return (
@@ -49,6 +50,7 @@ export default function App() {
} />
} />
} />
+ } />
diff --git a/src/components/dashboard/WebServiceSubscriptionManager.jsx b/src/components/dashboard/WebServiceSubscriptionManager.jsx
index 19f1092..fb3ca8e 100644
--- a/src/components/dashboard/WebServiceSubscriptionManager.jsx
+++ b/src/components/dashboard/WebServiceSubscriptionManager.jsx
@@ -246,8 +246,9 @@ export default function WebServiceSubscriptionManager({ order, onClose, onRefres
// 🛡️ NOUVELLE LOGIQUE DE RÉSILIATION (US 2.1 / 2.2)
// ==========================================
const calculateRefundEligibility = () => {
- if (!order || !order.created_at) return false;
- const orderDate = new Date(order.created_at);
+ if (!order || !order.activated_at) return false;
+ const orderDate = new Date(order.activated_at);
+ console.log("Order Date:", orderDate);
const now = new Date();
const diffDays = Math.ceil(Math.abs(now - orderDate) / (1000 * 60 * 60 * 24));
return diffDays <= 14;
@@ -508,7 +509,7 @@ export default function WebServiceSubscriptionManager({ order, onClose, onRefres
Votre abonnement a été activé il y a moins de 14 jours.
Vous allez être intégralement remboursé.
- Vos services HestiaCP et bases de données seront supprimés immédiatement.
+ Vos services seront supprimés immédiatement.
) : (
diff --git a/src/layouts/AppLayout.jsx b/src/layouts/AppLayout.jsx
index 158dc86..d44ecea 100644
--- a/src/layouts/AppLayout.jsx
+++ b/src/layouts/AppLayout.jsx
@@ -74,10 +74,7 @@ export default function AppLayout() {
-
- Facturation
- WIP
-
+ Facturation
Profil & Sécurité
WIP
diff --git a/src/pages/app/Dashboard.jsx b/src/pages/app/Dashboard.jsx
index 85f9dd3..4ca61aa 100644
--- a/src/pages/app/Dashboard.jsx
+++ b/src/pages/app/Dashboard.jsx
@@ -70,6 +70,7 @@ export default function Dashboard() {
// 🌟 Plus besoin de charger les IPs, on ouvre juste la modale comptable !
const handleManageSubscription = (order) => {
+ console.log("Gestion de l'abonnement pour la commande :", order);
// 1. Détection du type de service
const titleLower = (order.title || '').toLowerCase();
const isVPS = titleLower.includes('vps') || titleLower.includes('compute');
diff --git a/src/services/billing_api.js b/src/services/billing_api.js
index 19a67fe..ffc5b14 100644
--- a/src/services/billing_api.js
+++ b/src/services/billing_api.js
@@ -305,12 +305,12 @@ export const updateHostingPlan = (order_id, new_plan_id) =>
// Suppression
// Modification
// Lister
-export const getInvoiceList = () =>
- apiCall(`${BASE_URL}/api/client/invoice/get_list`);
+export const getInvoiceList = (client_id) =>
+ apiCall(`${BASE_URL}/api/client/invoice/get_list`, { client_id: client_id });
// Lire
-export const getInvoiceDetails = (InvoiceHash) =>
- apiCall(`${BASE_URL}/api/client/invoice/get`);
+export const getInvoiceDetails = (invoiceHash) =>
+ apiCall(`${BASE_URL}/api/client/invoice/get`, { hash: invoiceHash });
// ==========================================