This commit is contained in:
@@ -20,6 +20,21 @@ 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 (
|
||||
<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"
|
||||
@@ -36,7 +51,7 @@ export default function DashboardServiceCard({ order, onClick }) {
|
||||
{order.title}
|
||||
</h3>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user