This commit is contained in:
@@ -20,8 +20,23 @@ export default function DashboardServiceCard({ order, onClick }) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Fonction utilitaire pour traduire les cycles de FOSSBilling
|
||||||
|
const formatPeriod = (periodCode) => {
|
||||||
|
const periods = {
|
||||||
|
'1W': 'Hebdomadaire',
|
||||||
|
'1M': 'Mensuel',
|
||||||
|
'3M': 'Trimestriel',
|
||||||
|
'6M': 'Semestriel',
|
||||||
|
'1Y': 'Annuel',
|
||||||
|
'2Y': 'Tous les 2 ans',
|
||||||
|
'3Y': 'Tous les 3 ans'
|
||||||
|
};
|
||||||
|
// Si le code est inconnu, on affiche le code brut par sécurité, sinon on traduit
|
||||||
|
return periods[periodCode] || periodCode;
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="bg-gray-900 border border-gray-800 p-6 rounded-xl hover:border-cyan-400/50 transition-colors group cursor-pointer flex flex-col justify-between shadow-lg"
|
className="bg-gray-900 border border-gray-800 p-6 rounded-xl hover:border-cyan-400/50 transition-colors group cursor-pointer flex flex-col justify-between shadow-lg"
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
>
|
>
|
||||||
@@ -36,10 +51,10 @@ export default function DashboardServiceCard({ order, onClick }) {
|
|||||||
{order.title}
|
{order.title}
|
||||||
</h3>
|
</h3>
|
||||||
<p className="text-sm text-gray-500 mt-1">
|
<p className="text-sm text-gray-500 mt-1">
|
||||||
Facturation : {order.period}
|
Facturation : <span className="text-cyan-400 font-medium">{formatPeriod(order.period)}</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mt-6 pt-4 border-t border-gray-800 flex justify-between items-center text-sm">
|
<div className="mt-6 pt-4 border-t border-gray-800 flex justify-between items-center text-sm">
|
||||||
<span className="text-gray-400">ID Réseau: #{order.id}</span>
|
<span className="text-gray-400">ID Réseau: #{order.id}</span>
|
||||||
<span className="text-cyan-400 group-hover:underline">Gérer ></span>
|
<span className="text-cyan-400 group-hover:underline">Gérer ></span>
|
||||||
|
|||||||
Reference in New Issue
Block a user