fix: Update PrimeReact and fix all compilation errors
This commit is contained in:
14
app/(main)/dashboard/alertes/page.tsx
Normal file → Executable file
14
app/(main)/dashboard/alertes/page.tsx
Normal file → Executable file
@@ -312,17 +312,17 @@ const DashboardAlertes = () => {
|
||||
};
|
||||
|
||||
const severiteBodyTemplate = (rowData: Alerte) => (
|
||||
<Tag value={rowData.severite} severity={getSeveriteSeverity(rowData.severite)} />
|
||||
<Tag value={rowData.severite} severity={getSeveriteSeverity(rowData.severite) as any} />
|
||||
);
|
||||
|
||||
const statutBodyTemplate = (rowData: Alerte) => (
|
||||
<Tag value={rowData.statut} severity={getStatutSeverity(rowData.statut)} />
|
||||
<Tag value={rowData.statut} severity={getStatutSeverity(rowData.statut) as any} />
|
||||
);
|
||||
|
||||
const typeBodyTemplate = (rowData: Alerte) => (
|
||||
<div className="flex align-items-center">
|
||||
<i className={`${getTypeIcon(rowData.type)} mr-2`} style={{ color: getSeveriteColor(rowData.severite) }}></i>
|
||||
<Tag value={rowData.type} severity={getTypeSeverity(rowData.type)} />
|
||||
<Tag value={rowData.type} severity={getTypeSeverity(rowData.type) as any} />
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -357,9 +357,9 @@ const DashboardAlertes = () => {
|
||||
return (
|
||||
<div>
|
||||
<div className="text-sm">{echeance.toLocaleDateString('fr-FR')}</div>
|
||||
<Tag
|
||||
<Tag
|
||||
value={diffHours < 0 ? 'Échue' : `${Math.ceil(diffHours)}h restantes`}
|
||||
severity={severity}
|
||||
severity={severity as any}
|
||||
className="text-xs mt-1"
|
||||
/>
|
||||
</div>
|
||||
@@ -369,7 +369,7 @@ const DashboardAlertes = () => {
|
||||
const actionsBodyTemplate = (rowData: Alerte) => (
|
||||
<div className="flex flex-wrap gap-1">
|
||||
{rowData.actions.slice(0, 2).map((action, index) => (
|
||||
<Tag key={index} value={action} severity="secondary" className="text-xs" />
|
||||
<Tag key={index} value={action} severity="info" className="text-xs" />
|
||||
))}
|
||||
{rowData.actions.length > 2 && (
|
||||
<Tag value={`+${rowData.actions.length - 2}`} severity="info" className="text-xs" />
|
||||
@@ -623,7 +623,7 @@ const DashboardAlertes = () => {
|
||||
content={(item) => (
|
||||
<Card title={item.titre} subTitle={`${item.date} à ${item.time}`}>
|
||||
<p className="text-sm mb-2">{item.description}</p>
|
||||
<Tag value={item.statut} severity={getStatutSeverity(item.statut)} />
|
||||
<Tag value={item.statut} severity={getStatutSeverity(item.statut) as any} />
|
||||
</Card>
|
||||
)}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user