fix: Update PrimeReact and fix all compilation errors
This commit is contained in:
17
app/(main)/dashboard/page.tsx
Normal file → Executable file
17
app/(main)/dashboard/page.tsx
Normal file → Executable file
@@ -73,6 +73,10 @@ const Dashboard = () => {
|
||||
}, []);
|
||||
|
||||
// Hooks pour les données et actions du dashboard
|
||||
// Ne charger les données que si l'authentification est terminée ou qu'on a déjà des tokens
|
||||
const hasTokens = typeof window !== 'undefined' && !!localStorage.getItem('accessToken');
|
||||
const shouldLoadData = authProcessed || hasTokens || !currentCode;
|
||||
|
||||
const {
|
||||
metrics,
|
||||
chantiersActifs,
|
||||
@@ -145,7 +149,7 @@ const Dashboard = () => {
|
||||
showCompletionIcon={false}
|
||||
showPercentage={false}
|
||||
showValue={false}
|
||||
size="small"
|
||||
size="normal"
|
||||
style={{ width: '75px' }}
|
||||
/>
|
||||
<span className="ml-2 text-xs font-semibold text-gray-600">
|
||||
@@ -164,7 +168,7 @@ const Dashboard = () => {
|
||||
notation: 'compact',
|
||||
maximumFractionDigits: 1
|
||||
}).format(rowData.budget)}
|
||||
<CFASymbol size="small" className="ml-1" />
|
||||
<CFASymbol size="medium" className="ml-1" />
|
||||
</span>
|
||||
);
|
||||
}, []);
|
||||
@@ -541,7 +545,7 @@ const Dashboard = () => {
|
||||
<div className="text-900 font-medium text-xl">
|
||||
<div className="flex align-items-center">
|
||||
{loading ? '...' : (formattedMetrics?.chiffreAffaires || '0')}
|
||||
{!loading && <CFASymbol size="small" className="ml-1" />}
|
||||
{!loading && <CFASymbol size="medium" className="ml-1" />}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -735,7 +739,7 @@ const Dashboard = () => {
|
||||
{selectedChantier.budget ? (
|
||||
<span className="flex align-items-center">
|
||||
{new Intl.NumberFormat('fr-FR', { style: 'decimal' }).format(selectedChantier.budget)}
|
||||
<CFASymbol size="small" className="ml-1" />
|
||||
<CFASymbol size="medium" className="ml-1" />
|
||||
</span>
|
||||
) : 'Non défini'}
|
||||
</div>
|
||||
@@ -748,7 +752,7 @@ const Dashboard = () => {
|
||||
<span className="font-semibold">Reste: </span>
|
||||
<span className={`flex align-items-center ${ecartBudget >= 0 ? 'text-green-600' : 'text-red-600'}`}>
|
||||
{new Intl.NumberFormat('fr-FR', { style: 'decimal' }).format(Math.abs(ecartBudget))}
|
||||
<CFASymbol size="small" className="ml-1" />
|
||||
<CFASymbol size="medium" className="ml-1" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -831,4 +835,5 @@ const Dashboard = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export default Dashboard;
|
||||
export default Dashboard;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user