fix: Resolve TypeScript errors in page.tsx and phases-chantier/page.tsx

This commit is contained in:
dahoud
2025-10-15 20:01:04 +00:00
parent 763ab81da3
commit aed2ce0182
22 changed files with 152 additions and 118 deletions

View File

@@ -314,7 +314,7 @@ BTP Express`
return <Tag value="À échoir" severity="info" />;
}
let severity = 'warning';
let severity: "warning" | "danger" = 'warning';
if (rowData.joursRetard > 60) severity = 'danger';
else if (rowData.joursRetard > 30) severity = 'warning';
@@ -340,7 +340,7 @@ BTP Express`
};
const risqueBodyTemplate = (rowData: any) => {
const config = {
const config: Record<string, { color: "success" | "warning" | "danger", icon: string }> = {
'FAIBLE': { color: 'success', icon: 'pi-check-circle' },
'MOYEN': { color: 'warning', icon: 'pi-exclamation-triangle' },
'FORT': { color: 'danger', icon: 'pi-times-circle' }
@@ -360,20 +360,22 @@ BTP Express`
<ActionButtonGroup>
<ActionButton
icon="pi pi-send"
color="warning"
color="orange"
tooltip="Envoyer relance"
onClick={() => ouvrirRelance(rowData)}
disabled={rowData.joursRetard <= 0}
/>
<ActionButton
icon="pi pi-phone"
color="info"
color="blue"
tooltip="Appeler client"
onClick={() => {}}
/>
<ViewButton
tooltip="Voir historique"
onClick={() => {}}
/>
</ActionButtonGroup>
);